Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9867 Discussions

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

mvirt
Novice
2,206 Views

I used Board_Support_Package_Sources_for_Intel_Quark_v1.0.1.7z from https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=23197 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 "", line 1, in

ImportError: No module named Image

>>>

>>> from PIL import Image

Traceback (most recent call last):

File "", line 1, in

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

<...
9 Replies
Juan_M_Intel
Employee
373 Views

Hi virtualmark,

Have you tried updating the library? The file python-image_2.7.3-r0.3_i586.ipk is included in AlexT_Intel repo. I'd suggest you to follow this guide http://alextgalileo.altervista.org/package-repo-configuration-instructions.html http://alextgalileo.altervista.org/package-repo-configuration-instructions.html and as soon as you have done all of the 3 steps use command opkg install python-image_2.7.3 , that should install the package. Also make sure you have all the dependencies installed as well. Let me know if this work for you.

Regards,

 

JPMontero_Intel
AT9
Honored Contributor II
373 Views

In addition to that, you can check if your OS image thinks it has this module already installed by running "opkf list-installed|grep python-image". If not, then yeah, just install it from my repo and you should be good.

By the way, in addition to the Quark BSP v1.0.1 there's a separate file with patches, which adds important fixes released after the BSP was released, if you're going to use your image for anything serious, hopefully you've applied those patches before building the image. You haven't mentioned that in your post, so I figured I rather tell you about that.

Carlos_M_Intel
Employee
373 Views

Hi virtualmark;

Were you able to use the Python image library successfully?

Regards;

CMata

PAgra4
New Contributor II
373 Views

Hello All,

I am getting "ImportError: No module named Image ". But I see that "python-image" is already installed and still getting the error. Can you help me with this?

--Paridhi

Juan_M_Intel
Employee
373 Views

Hi Paridhi_Agrawal,

Have you tried updating the module and the library?

Regards,

 

JPMontero_Intel
PAgra4
New Contributor II
373 Views

HI JPMontero_Intel,

Yes I tried updating but it said updated. SO I tried using this : http://www.pythonware.com/products/pil/ Python Imaging Library (PIL) .

Thanks

--Paridhi

Juan_M_Intel
Employee
373 Views

Is this library working for you or are you getting the same error?

Regards,

 

JPMontero_Intel
PAgra4
New Contributor II
373 Views

HI JPMontero_Intel,

This is working for me

But my problem is a little different now. It is regarding installing driver for adafruit 2.8" TFT screen (ILI9341) on Galileo. I want to install xf86-video-fbdev on iot-dev kit image.

Thanks

--Paridhi

Juan_M_Intel
Employee
373 Views

I'll review the thread. If I have suggestions I'll post them in there.

 

Regards,

JPMontero_Intel

Reply