without checking the toolchain I'd suspect it doesn't support Python out of the box. Just check whether there is a /usr/lib/python2.7 or so contained in the toolchain.
Alternatives for instance:
- compile on target
- compile in a chroot environment to possibly accelerate the compilation - just "sudo mount edison-image-edison.ext4 /mnt -o loop && sudo chroot /mnt" in a Linux shell
Which BSP did you used to build the toolchain?
Are you compiling the code using the toolchain? Or are you compiling using your PC resources?
Did you check if you have the folder /usr/lib/python2.7?
1, I directly download the toolchain from http://downloadmirror.intel.com/25028/eng/edison-sdk-linux32-ww18-15.zip
2, I compile the code after using `source environment-setup-core2-32-poky-linux`
3, yes, my host pc has the folder /usr/lib/python2.7
when after type "source /opt/poky-edison/1.6/environment-setup-core2-32-poky-linux", the python path will be the one in yocto image.
I can see the same problem in yocto image's python shell when import subprocess.
Can you reproduce the problem?
1, I directly download the toolchain from http://downloadmirror.intel.com/25028/eng/edison-sdk-linux32-ww18-15.zip and install it
3, enter python shell and "import subprocess"
Hi Sergio and Charlie
I just tried the newest version http://downloadmirror.intel.com/25028/eng/edison-sdk-linux32-ww25.5-15.zip
it CAN import subprocess now, but it CANNOT import filecmp.
I mainly use node-v4.0.0 configure file to test the toolchain
I found a workaround that lets me run import subprocess and import filecmp without any errors. I changed the file path of PYTHONHOME in /opt/poky-edison/1.7.2/environment-setup-core2-32-poky-linux.
cat /opt/poky-edison/1.7.2/environment-setup-core2-32-poky-linux PYTHONHOME=/opt/poky-edison/1.7.2/sysroots/i686-pokysdk-linux/usr
Try with these changes and let me know your results.
I am confused. the PYTHONHOME in /opt/poky-edison/1.7.2/environment-setup-core2-32-poky-linux is exactly what you write
jzd@jzd32:/opt/poky-edison/1.7.2$ cat environment-setup-core2-32-poky-linux | grep PYTHON
So nothing need to modify.