- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi, the pdf http://download.intel.com/support/edison/sb/edison_nag_331192003.pdf http://download.intel.com/support/edison/sb/edison_nag_331192003.pdf says we can cross build app using edison toolchain.
source /opt/poky-edison/1.6/environment-setup-core2-32-poky-linux
But when the app use python during its building, like nodejs, iotjs and so on, it always throw error when building.
Take nodejs as an example:
jzd@jzd32:~/Downloads/node-v4.0.0$ ./configure
Traceback (most recent call last):
File "./configure", line 7, in
import subprocess
ImportError: No module named subprocess
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi jzd,
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?
Regards,
Charlie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Charlie
1, I directly download the toolchain from http://downloadmirror.intel.com/25028/eng/edison-sdk-linux32-ww25.5-15.zip 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
Thanks
Zidong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
But, are you using Python from the PC or from the Yocto image? Enter into the Ubuntu terminal and type python. In the python prompt type import subprocess. Do you still see the same error?
Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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-ww25.5-15.zip http://downloadmirror.intel.com/25028/eng/edison-sdk-linux32-ww18-15.zip and install it
2,`source environment-setup-core2-32-poky-linux
3, enter python shell and "import subprocess"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
Do you see the same behavior with the newest version http://downloadmirror.intel.com/25028/eng/edison-sdk-linux32-ww25.5-15.zip http://downloadmirror.intel.com/25028/eng/edison-sdk-linux32-ww25.5-15.zip ?
Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi jzd,
Have you been able to successfully use python in with the toolchain?
Did you try with the latest version? Or do you want to use the ww18-15?
Regards,
Charlie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Sergio and Charlie
I just tried the newest version http://downloadmirror.intel.com/25028/eng/edison-sdk-linux32-ww25.5-15.zip 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
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
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.
Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
export PYTHONHOME=/opt/poky-edison/1.7.2/sysroots/i686-pokysdk-linux/usr
So nothing need to modify.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
That was a mistake, the path I wanted to suggest was export PYTHONHOME=/opt/poky-edison/1.7.2/sysroots/core2-32-poky-linux/usr
Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page