MX6ULLEVK : "pip3 install spidev" error

cancel
Showing results for 
Search instead for 
Did you mean: 

MX6ULLEVK : "pip3 install spidev" error

592 Views
hiectai
Contributor III

Hello community
I get the following error when trying to install python spidev with pip command.

/**********************************/

root@imx6ull14x14evk:~# pip3 install spidev
Collecting spidev
Using cached https://files.pythonhosted.org/packages/fb/14/4c2e1640f0cb04862c76d9d76ed7c945b0f67876e503ac02f7f675...
Installing collected packages: spidev
Running setup.py install for spidev ... error
ERROR: Complete output from command /usr/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/var/volatile/tmp/pip-install-yjrykylr/spidev/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /var/volatile/tmp/pip-record-ct140vcz/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
running build_ext
building 'spidev' extension
creating build
creating build/temp.linux-armv7l-3.5
arm-poky-linux-gnueabi-gcc -march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 -DNDEBUG -fno-inline --sysroot=/home/hinoeng/yocto/fsl-release-bsp/buildull/tmp/sysroots/imx6ull14x14evk -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/hinoeng/yocto/fsl-release-bsp/buildull/tmp/work/cortexa7hf-neon-poky-linux-gnueabi/python3/3.5.1-r1.0=/usr/src/debug/python3/3.5.1-r1.0 -fdebug-prefix-map=/home/hinoeng/yocto/fsl-release-bsp/buildull/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/hinoeng/yocto/fsl-release-bsp/buildull/tmp/sysroots/imx6ull14x14evk= -fPIC -I/usr/include/python3.5m -c spidev_module.c -o build/temp.linux-armv7l-3.5/spidev_module.o
unable to execute 'arm-poky-linux-gnueabi-gcc': No such file or directory
error: command 'arm-poky-linux-gnueabi-gcc' failed with exit status 1
----------------------------------------
ERROR: Command "/usr/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/var/volatile/tmp/pip-install-yjrykylr/spidev/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /var/volatile/tmp/pip-record-ct140vcz/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /var/volatile/tmp/pip-install-yjrykylr/spidev/

/**********************************/
This is first time with python so I don't know how to fix this problem. Can someone help me?
Thank you

Labels (2)
0 Kudos
4 Replies

411 Views
karangajjar
Senior Contributor II

Hi タイ チャン,

This seems like to be linux environment issue for installation. As you are installing directly on the board, it should not give you issue for gcc not found. We will try to replicate it here. Till then can you let us know which is the yocto and linux kernel version you are using?

Also try installing build-essential and then run above command?

Regards,

Karan Gajjar

0 Kudos

411 Views
hiectai
Contributor III

Hikaran gajjar

I installed build-essential by adding "IMAGE_INSTALL + = packagegroup-core-buildessential". Then "pip install spidev" successfully but "pip3 install spidev" still failed. 

/**********************/

root@imx6ull14x14evk:~# pip install spidev
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting spidev
Downloading https://files.pythonhosted.org/packages/fb/14/4c2e1640f0cb04862c76d9d76ed7c945b0f67876e503ac02f7f675...
Installing collected packages: spidev
Running setup.py install for spidev ... done
Successfully installed spidev-3.4


root@imx6ull14x14evk:~# pip3 install spidev
Collecting spidev
Using cached https://files.pythonhosted.org/packages/fb/14/4c2e1640f0cb04862c76d9d76ed7c945b0f67876e503ac02f7f675...
Installing collected packages: spidev
Running setup.py install for spidev ... error
ERROR: Complete output from command /usr/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/var/volatile/tmp/pip-install-mjnl6kr0/spidev/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /var/volatile/tmp/pip-record-ejs1zhl2/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
running build_ext
building 'spidev' extension
creating build
creating build/temp.linux-armv7l-3.5
arm-poky-linux-gnueabi-gcc -march=armv7ve -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 -DNDEBUG -fno-inline --sysroot=/home/hinoeng/yocto/fsl-release-bsp/buildull/tmp/sysroots/imx6ull14x14evk -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/hinoeng/yocto/fsl-release-bsp/buildull/tmp/work/cortexa7hf-neon-poky-linux-gnueabi/python3/3.5.1-r1.0=/usr/src/debug/python3/3.5.1-r1.0 -fdebug-prefix-map=/home/hinoeng/yocto/fsl-release-bsp/buildull/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/home/hinoeng/yocto/fsl-release-bsp/buildull/tmp/sysroots/imx6ull14x14evk= -fPIC -I/usr/include/python3.5m -c spidev_module.c -o build/temp.linux-armv7l-3.5/spidev_module.o
In file included from /usr/lib/gcc/arm-poky-linux-gnueabi/5.3.0/include-fixed/syslimits.h:7:0,
from /usr/lib/gcc/arm-poky-linux-gnueabi/5.3.0/include-fixed/limits.h:34,
from /usr/include/python3.5m/Python.h:11,
from spidev_module.c:28:
/usr/lib/gcc/arm-poky-linux-gnueabi/5.3.0/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
In file included from spidev_module.c:28:0:
/usr/include/python3.5m/Python.h:25:19: fatal error: stdio.h: No such file or directory
compilation terminated.
error: command 'arm-poky-linux-gnueabi-gcc' failed with exit status 1
----------------------------------------
ERROR: Command "/usr/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/var/volatile/tmp/pip-install-mjnl6kr0/spidev/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /var/volatile/tmp/pip-record-ejs1zhl2/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /var/volatile/tmp/pip-install-mjnl6kr0/spidev/

/*******************************/

Could you give me advice to solve this problem?

Thank you so much

0 Kudos

411 Views
karangajjar
Senior Contributor II

Hi タイ チャン,

Try installing glibc. And make sure that limit.h, stdio.h is in your filesystem and the path is included in the environment variable.

Regards,

Karan Gajjar

0 Kudos

411 Views
hiectai
Contributor III

Hi  karan gajjar
I will try installing build-essential.
I using fsl-yocto-L4.1.15_2.0.0-ga, kernel version 4.1.15.

Thank you so much

0 Kudos