9 Replies Latest reply on Dec 30, 2014 2:08 PM by JPMontero_Intel

    Use the Python Image library but got "No module named Image" error.


      I used Board_Support_Package_Sources_for_Intel_Quark_v1.0.1.7z from https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23197, and was able to compile a Yocto image.


      I can see the both the python-imaging_1.1.7.bb and python-imaging are in the package. But when I tried to run it, I got following errors.


      root@clanton:~# python

      Python 2.7.3 (default, Oct 18 2014, 03:24:08)

      [GCC 4.7.2] on linux2

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

      >>> import Image

      Traceback (most recent call last):

        File "<stdin>", line 1, in <module>

      ImportError: No module named Image


      >>> from PIL import Image

      Traceback (most recent call last):

        File "<stdin>", line 1, in <module>

      ImportError: No module named PIL



      Just wonder where may go wrong and how to fix it?


      additional info:

      root@clanton:~# ls -l /usr/lib/libz*

      lrwxrwxrwx 1 root root    13 Oct 18 16:57 /usr/lib/libz.so -> libz.so.1.2.7

      lrwxrwxrwx 1 root root    13 Oct 18 16:55 /usr/lib/libz.so.1 -> libz.so.1.2.7

      -rwxr-xr-x 1 root root 88764 Oct 18 08:55 /usr/lib/libz.so.1.2.7

      root@clanton:~# ls -l /usr/lib/libfree*

      -rwxr-xr-x 1 root root    942 Oct 18 09:05 /usr/lib/libfreetype.la

      lrwxrwxrwx 1 root root     21 Oct 18 16:59 /usr/lib/libfreetype.so -> libfreetype.so.6.10.0

      lrwxrwxrwx 1 root root     21 Oct 18 16:55 /usr/lib/libfreetype.so.6 -> libfreetype.so.6.10.0

      -rwxr-xr-x 1 root root 586604 Oct 18 09:05 /usr/lib/libfreetype.so.6.10.0

      root@clanton:~# ls -l /usr/lib/libjp*

      -rwxr-xr-x 1 root root    912 Oct 18 09:12 /usr/lib/libjpeg.la

      lrwxrwxrwx 1 root root     16 Oct 18 16:59 /usr/lib/libjpeg.so -> libjpeg.so.8.4.0

      lrwxrwxrwx 1 root root     16 Oct 18 16:55 /usr/lib/libjpeg.so.8 -> libjpeg.so.8.4.0

      -rwxr-xr-x 1 root root 255668 Oct 18 09:16 /usr/lib/libjpeg.so.8.4.0




      root@clanton:~# ls /usr/lib/python2.7

      BaseHTTPServer.py       fnmatch.pyo         pydoc_data

      BaseHTTPServer.pyo      formatter.py        quopri.py

      Bastion.py              formatter.pyo       quopri.pyo

      Bastion.pyo             fpformat.py         random.py

      CGIHTTPServer.py        fpformat.pyo        random.pyo

      CGIHTTPServer.pyo       fractions.py        re.py

      ConfigParser.py         fractions.pyo       re.pyo

      ConfigParser.pyo        ftplib.py           repr.py

      Cookie.py               ftplib.pyo          repr.pyo

      Cookie.pyo              functools.py        rexec.py

      DocXMLRPCServer.py      functools.pyo       rexec.pyo

      DocXMLRPCServer.pyo     genericpath.py      rfc822.py

      HTMLParser.py           genericpath.pyo     rfc822.pyo

      HTMLParser.pyo          getopt.py           rlcompleter.py

      LICENSE.txt             getopt.pyo          rlcompleter.pyo

      MimeWriter.py           getpass.py          robotparser.py

      MimeWriter.pyo          getpass.pyo         robotparser.pyo

      Queue.py                gettext.py          runpy.py

      Queue.pyo               gettext.pyo         runpy.pyo

      SimpleHTTPServer.py     glob.py             sched.py

      SimpleHTTPServer.pyo    glob.pyo            sched.pyo

      SimpleXMLRPCServer.py   gzip.py             sets.py

      SimpleXMLRPCServer.pyo  gzip.pyo            sets.pyo

      SocketServer.py         hashlib.py          sgmllib.py

      SocketServer.pyo        hashlib.pyo         sgmllib.pyo

      StringIO.py             heapq.py            sha.py

      StringIO.pyo            heapq.pyo           sha.pyo

      UserDict.py             hmac.py             shelve.py

      UserDict.pyo            hmac.pyo            shelve.pyo

      UserList.py             hotshot             shlex.py

      UserList.pyo            htmlentitydefs.py   shlex.pyo

      UserString.py           htmlentitydefs.pyo  shutil.py

      UserString.pyo          htmllib.py          shutil.pyo

      _LWPCookieJar.py        htmllib.pyo         site-packages

      _LWPCookieJar.pyo       httplib.py          site.py

      _MozillaCookieJar.py    httplib.pyo         site.pyo

      _MozillaCookieJar.pyo   idlelib             sitecustomize.py

      __future__.py           ihooks.py           sitecustomize.pyo

      __future__.pyo          ihooks.pyo          smtpd.py

      __phello__.foo.py       imaplib.py          smtpd.pyo

      __phello__.foo.pyo      imaplib.pyo         smtplib.py

      _abcoll.py              imghdr.py           smtplib.pyo

      _abcoll.pyo             imghdr.pyo          sndhdr.py

      _pyio.py                importlib           sndhdr.pyo

      _pyio.pyo               imputil.py          socket.py

      _strptime.py            imputil.pyo         socket.pyo

      _strptime.pyo           inspect.py          sqlite3

      _threading_local.py     inspect.pyo         sre.py

      _threading_local.pyo    io.py               sre.pyo

      _weakrefset.py          io.pyo              sre_compile.py

      _weakrefset.pyo         json                sre_compile.pyo

      abc.py                  keyword.py          sre_constants.py

      abc.pyo                 keyword.pyo         sre_constants.pyo

      aifc.py                 lib-dynload         sre_parse.py

      aifc.pyo                lib-tk              sre_parse.pyo

      antigravity.py          lib2to3             ssl.py

      antigravity.pyo         linecache.py        ssl.pyo

      anydbm.py               linecache.pyo       stat.py

      anydbm.pyo              locale.py           stat.pyo

      argparse.py             locale.pyo          statvfs.py

      argparse.pyo            logging             statvfs.pyo

      ast.py                  macpath.py          string.py

      ast.pyo                 macpath.pyo         string.pyo

      asynchat.py             macurl2path.py      stringold.py

      asynchat.pyo            macurl2path.pyo     stringold.pyo

      asyncore.py             mailbox.py          stringprep.py

      asyncore.pyo            mailbox.pyo         stringprep.pyo

      atexit.py               mailcap.py          struct.py

      atexit.pyo              mailcap.pyo         struct.pyo

      audiodev.py             markupbase.py       subprocess.py

      audiodev.pyo            markupbase.pyo      subprocess.pyo

      base64.py               md5.py              sunau.py

      base64.pyo              md5.pyo             sunau.pyo

      bdb.py                  mhlib.py            sunaudio.py

      bdb.pyo                 mhlib.pyo           sunaudio.pyo

      binhex.py               mimetools.py        symbol.py

      binhex.pyo              mimetools.pyo       symbol.pyo

      bisect.py               mimetypes.py        symtable.py

      bisect.pyo              mimetypes.pyo       symtable.pyo

      bsddb                   mimify.py           sysconfig.py

      cProfile.py             mimify.pyo          sysconfig.pyo

      cProfile.pyo            modulefinder.py     tabnanny.py

      calendar.py             modulefinder.pyo    tabnanny.pyo

      calendar.pyo            multifile.py        tarfile.py

      cgi.py                  multifile.pyo       tarfile.pyo

      cgi.pyo                 multiprocessing     telnetlib.py

      cgitb.py                mutex.py            telnetlib.pyo

      cgitb.pyo               mutex.pyo           tempfile.py

      chunk.py                netrc.py            tempfile.pyo

      chunk.pyo               netrc.pyo           test

      cmd.py                  new.py              textwrap.py

      cmd.pyo                 new.pyo             textwrap.pyo

      code.py                 nntplib.py          this.py

      code.pyo                nntplib.pyo         this.pyo

      codecs.py               ntpath.py           threading.py

      codecs.pyo              ntpath.pyo          threading.pyo

      codeop.py               nturl2path.py       timeit.py

      codeop.pyo              nturl2path.pyo      timeit.pyo

      collections.py          numbers.py          toaiff.py

      collections.pyo         numbers.pyo         toaiff.pyo

      colorsys.py             opcode.py           token.py

      colorsys.pyo            opcode.pyo          token.pyo

      commands.py             optparse.py         tokenize.py

      commands.pyo            optparse.pyo        tokenize.pyo

      compileall.py           os.py               trace.py

      compileall.pyo          os.pyo              trace.pyo

      compiler                os2emxpath.py       traceback.py

      config                  os2emxpath.pyo      traceback.pyo

      contextlib.py           pdb.doc             tty.py

      contextlib.pyo          pdb.py              tty.pyo

      cookielib.py            pdb.pyo             types.py

      cookielib.pyo           pickle.py           types.pyo

      copy.py                 pickle.pyo          unittest

      copy.pyo                pickletools.py      urllib.py

      copy_reg.py             pickletools.pyo     urllib.pyo

      copy_reg.pyo            pipes.py            urllib2.py

      csv.py                  pipes.pyo           urllib2.pyo

      csv.pyo                 pkgutil.py          urlparse.py

      ctypes                  pkgutil.pyo         urlparse.pyo

      curses                  plat-linux2         user.py

      dbhash.py               platform.py         user.pyo

      dbhash.pyo              platform.pyo        uu.py

      decimal.py              plistlib.py         uu.pyo

      decimal.pyo             plistlib.pyo        uuid.py

      difflib.py              popen2.py           uuid.pyo

      difflib.pyo             popen2.pyo          warnings.py

      dircache.py             poplib.py           warnings.pyo

      dircache.pyo            poplib.pyo          wave.py

      dis.py                  posixfile.py        wave.pyo

      dis.pyo                 posixfile.pyo       weakref.py

      distutils               posixpath.py        weakref.pyo

      doctest.py              posixpath.pyo       webbrowser.py

      doctest.pyo             pprint.py           webbrowser.pyo

      dumbdbm.py              pprint.pyo          whichdb.py

      dumbdbm.pyo             profile.py          whichdb.pyo

      dummy_thread.py         profile.pyo         wsgiref

      dummy_thread.pyo        pstats.py           wsgiref.egg-info

      dummy_threading.py      pstats.pyo          xdrlib.py

      dummy_threading.pyo     pty.py              xdrlib.pyo

      email                   pty.pyo             xml

      encodings               py_compile.py       xmllib.py

      filecmp.py              py_compile.pyo      xmllib.pyo

      filecmp.pyo             pyclbr.py           xmlrpclib.py

      fileinput.py            pyclbr.pyo          xmlrpclib.pyo

      fileinput.pyo           pydoc.py            zipfile.py

      fnmatch.py              pydoc.pyo           zipfile.pyo