4 Replies Latest reply on Apr 8, 2016 10:43 AM by Intel Corporation

    bitbake does not see contextlib module

    Thomas1313

      Hello,

       

      I am trying to bitbake Edison image from 'edison-src-ww18-15.tgz' tarball as it described in 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 <module>

          import bb

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

          import bb.msg

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

          import bb.event

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

          import bb.utils

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

          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 "<stdin>", line 1, in <module>

      ImportError: No module named contextlib

       

      Please help me import contextlib to my python!