Wind River Support Network

HomeDefectsLIN6-8637
Fixed

LIN6-8637 : SDK python: ImportError: No module named site

Created: Oct 28, 2014    Updated: Dec 3, 2018
Resolved Date: Nov 17, 2014
Found In Version: 6.0.0.12
Fix Version: 6.0.0.15
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: Build & Config

Description

 Python is broken in SDK:
$ . ./env.sh
$ python hello.py
ImportError: No module named site

Workaround

Manually set the PYTHONHOME environment variable to host's /usr

Steps to Reproduce

$ cd <sdk>
$ cat hello.py
print "hello"
$ python hello.py
hello

$ cd <project>
$ /.../lx6/wrlinux-6/wrlinux/configure --enable-board=intel-x86-64 --enable-kernel=standard --enable-rootfs=glibc_core+debug --enable-checkout-all-layers=yes --enable-reconfig --enable-rm-oldimgs=yes --with-template=feature/initramfs,feature/kexec,feature/kdump --with-rcpl-version=0012
$ make export-sdk
$ cd export/
$ ./wrlinux-6.0.0.12-eglibc-x86_64-intel_x86_64-wrlinux-image-glibc-core-sdk.sh
$ cd <sdk>
$ . ./env.sh
$ python hello.py
ImportError: No module named site

$ which python
/usr/bin/python
$ python --version
Python 2.7.3

Other Downloads


Live chat
Online