Error No Module Named Pil
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business importerror no module named pil mac Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs no module named pil windows Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just no module named pil mac like you, helping each other. Join them; it only takes a minute: Sign up No Module named PIL up vote 0 down vote favorite I know PIL is deprecated, so I installed Pillow instead, and for backward
Importerror: No Module Named Image
compatibility reason, Pillow is still using PIL as its module name. Here's my pip freeze look like for Pillow: Pillow=3.2.0 Here's how I use it in my code: import PIL as pillow from PIL import Image As someone suggested in a similar post, also, I tried import PIL from PIL import Image Neither works. Both give me this error: ImportError: No module named PIL Also, I tried: import Image it gives me: ImportError: No module install pil named Image Help is really appreciated! python python-imaging-library share|improve this question edited Jun 30 at 22:49 asked Jun 30 at 22:38 SSun 2691519 What is the output of python --version and pip --version? –Cory Shay Jun 30 at 22:41 @CoryShay Python 2.7.11 and pip 1.5.6, and for various reason, I cannot upgrade both. –SSun Jun 30 at 22:44 does import Image work? –Haifeng Zhang Jun 30 at 22:45 @haifzhan nope, I also tried that. I'll edit my question. –SSun Jun 30 at 22:49 @SSun How about import pil? –Cory Shay Jun 30 at 22:50 | show 11 more comments 1 Answer 1 active oldest votes up vote 1 down vote accepted As per my comment since it helped you out and answered your problem: The issue that you were seeing is that you had pip version 1.5.6, and the version of pip does dictate how packages are unzipped, which ultimately determines whether or not modules are loaded properly. All that is needed is: pip install --upgrade pip Which allows pip to upgrade itself. Use sudo if you're on Mac/Linux, otherwise you'll likely need to 'Run as Administrator' on Windows. And voila, you can now properly import the PIL modules: Python 2.7.12 (default, Jun 29 2016, 13:16:51) [GCC 4.2.1 Compatible Apple LLVM 7.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss no module named image the workings and policies of this site About Us Learn more
No Module Named Pil Ubuntu
about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow
Importerror No Module Named Pil Windows
Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each http://stackoverflow.com/questions/38134362/no-module-named-pil other. Join them; it only takes a minute: Sign up ImportError: no module named Image, ImportError: no module named PIL — Python, Anaconda, PIL, pillow, mac 10.10.3, up vote 6 down vote favorite I'm using a Mac OS x 10.10.3 Yosemite, and Python 2.7.9 |Anaconda 2.2.0 (x86_64) for a lot of python stuff. I'm using eclipse, and google http://stackoverflow.com/questions/31016085/importerror-no-module-named-image-importerror-no-module-named-pil-python app engine. I'm running out of stack overflow posts to read for this error that a lot of people have, then resolve by some means that has not work for me. I'm getting this error: import Image ImportError: No module named Image From this code: try: from PIL import Image except: import Image After I already tried the following: conda install pillow sudo pip install pillow pip install pillow pip install pil Some stack overflow post suggested seeing if the path was there for another user, so I tried this in my terminal: python Python 2.7.9 |Anaconda 2.2.0 (x86_64)| (default, Dec 15 2014, 10:37:34) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://binstar.org >>> import sys >>> print(sys.path) and got: ['', '/Users/jrussek/anaconda/lib/python27.zip', '/Users/jrussek/anaconda/lib/python2.7', '/Users/jrussek/anaconda/lib/python2.7/plat-darwin', '/Users/jrussek/anaconda/lib/python2.7/plat-mac', '/Users/jrussek/anaconda/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/jrussek/anaconda/lib/python2.7/lib-tk', '/Users/jrussek/anaconda/lib/python2.7/lib-old', '/Users/jrussek/anaconda/lib/python2.7/lib-dynload', '/Users/jrussek/anaconda/lib/python2.7/site-packages', '/Users/jrussek/anaconda/lib/python2.7/site-packages/Sphinx-1.2.3 py2.7.egg', '/Users/jrussek/anaconda/lib/python2.7/site-packages/aeosa', '/Users/jrussek/anaconda/lib/python2.7/site-packages/cryptography-0.8-py2.7-macosx-10.5-x86_64.egg', '/Users/jrussek/anaconda/lib/python2.7/site-packages/setuptools-14.3-py2.7.egg'] I thought it wasn't in my path so I tried to append the thing: PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/pyth
Sign in Pricing Blog Support Search GitHub This repository Watch 75 Star 2,515 Fork 178 jorgebastida/glue Code Issues 50 https://github.com/jorgebastida/glue/issues/14 Pull requests 14 Projects 0 Pulse Graphs New issue ImportError: No https://github.com/adrienverge/PhotoCollage/issues/1 module named PIL #14 Closed jazzsequence opened this Issue Jan 17, 2012 · 11 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 3 participants jazzsequence commented Jan 17, 2012 OSX 10.7.2 Homebrew wasn't installed (even no module though Xcode was), so I installed that manually. No problem with the brew install jpeg. sudo pip install glue gave me a sudo: pip: command not found so ran the sudo easy_install glue That worked, but whenever I invoke glue I get: Traceback (most recent call last): File "/usr/local/bin/glue", line 8, in
Sign in Pricing Blog Support Search GitHub This repository Watch 11 Star 73 Fork 17 adrienverge/PhotoCollage Code Issues 5 Pull requests 1 Projects 0 Pulse Graphs New issue Application can't start (No module named 'PIL') #1 Closed Nico207 opened this Issue Jun 8, 2014 · 9 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 2 participants Nico207 commented Jun 8, 2014 Hello! I got this error when I try to start photocollage : -------- Output error -------- Traceback (most recent call last): File "./photocollage", line 21, in from photocollagelib import gtkgui File "/home/xxxxxxx/Programmes/PhotoCollage-master/photocollagelib/gtkgui.py", line 25, in import PIL.Image ImportError: No module named 'PIL' -------- End of output error -------- I have this when I download the archive or when I install it manually. Nico207 changed the title from Application can't start to Application can't start (No module named 'PIL') Jun 8, 2014 Owner adrienverge commented Jun 9, 2014 Hi Nico207, It seems that the required dependency (the Python Imaging Library) is not installed on your system. You have to install PIL for Python 3 first. What operating system are you using? Nico207 commented Jun 9, 2014 I'm on Ubuntu 14.04 You're right, I don't have PIL installed (or not correctly) Here is the solution for those who have the same problem : http://stackoverflow.com/questions/15002538/install-pil-in-ubuntu-12-04-python-2-7-and-python-3-2 sudo aptitude install python3-setuptools sudo easy_install3 pip sudo apt-get install python3-dev wget https://github.com/python-imaging/Pillow/archive/master.zip sudo unzip master.zip sudo python3 setup.py build sudo python3 setup.py install All work fine now. Nico207 commented Jun 9, 2014 I have another problem :