Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AOrlo6
Novice
1,292 Views

bitbake does not see contextlib module

Hello,

I am trying to bitbake Edison image from 'edison-src-ww18-15.tgz' tarball as it described in http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edisonbsp_ug_331188007.pdf BSP User Guide. But process stops with error message: 'ImportError: No module named contextlib':

artem@ubuntu:~/SDK/edison-src$ bitbake edison-image

Traceback (most recent call last):

File "/home/artem/SDK/edison-src/poky/bitbake/bin/bitbake", line 34, in

import bb

File "/home/artem/SDK/edison-src/poky/bitbake/lib/bb/__init__.py", line 75, in

import bb.msg

File "/home/artem/SDK/edison-src/poky/bitbake/lib/bb/msg.py", line 32, in

import bb.event

File "/home/artem/SDK/edison-src/poky/bitbake/lib/bb/event.py", line 34, in

import bb.utils

File "/home/artem/SDK/edison-src/poky/bitbake/lib/bb/utils.py", line 35, in

from contextlib import contextmanager

ImportError: No module named contextlib

I already have this module in my system (Ubuntu 14.04 LTS):

artem@ubuntu:~/SDK/edison-src$ python --version

Python 2.7.3

artem@ubuntu:~/SDK/edison-src$ ls -la /usr/lib/python2.7 | grep contextlib

-rw-r--r-- 1 root root 4424 Jun 22 2015 contextlib.py

But when I try to import it manually python fails:

artem@ubuntu:~/SDK/edison-src$ python

Python 2.7.3 (default, Jun 19 2015, 12:59:29)

[GCC 4.9.1] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import contextlib

Traceback (most recent call last):

File "", line 1, in

ImportError: No module named contextlib

Please help me import contextlib to my python!

4 Replies
AOrlo6
Novice
87 Views

Hmmm,

It seems that I have wrong python in my shell path:

artem@ubuntu:~$ which python

/opt/poky-edison/1.7.2/sysroots/x86_64-pokysdk-linux/usr/bin/python

idata
Community Manager
87 Views

Hi Thomas1313,

 

 

Were you able to import contextlib to python? Also, there's a newer image than edison-src-ww18-15.tgz available here: https://software.intel.com/en-us/iot/hardware/edison/downloads https://software.intel.com/en-us/iot/hardware/edison/downloads in case you want to try it out.

 

 

Sergio

 

AOrlo6
Novice
87 Views

Hi Sergio,

I had an poky toolchain in my $PATH variable from previous installation so python was used from there. I cleared it and bitbake started successfully.

Which download should I use from https://software.intel.com/en-us/iot/hardware/edison/downloads https://software.intel.com/en-us/iot/hardware/edison/downloads to get new edison-src tarball? Unfortunately 'edison-src-ww18-15.tgz' has old poky 1.6.1 toolchain... (((

Reply