Reputation: 107
I'm trying to use Pillow. I've followed the installation instructions on this site: http://www.pythonforbeginners.com/gui/how-to-use-pillow
When I type the following into my terminal window:
$ python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import Image
>>>
It doesn't give me any errors, so assuming the linked site is correct, this means that Pillow is correctly installed. However, when I try to use the PIL library from the Python IDLE, like this:
from PIL import Image
Python gives an error message:
Traceback (most recent call last):
File "/Sample_application.py",
line 3, in <module>
from PIL import Image
ImportError: No module named 'PIL'
What am I doing wrong? I'm using mac OSX 10.9, Mavericks
Upvotes: 1
Views: 3341
Reputation: 1123400
You have at least two Python installations on your system; the default system-provided 2.7 and Python 3.4.
Your pip
command is tied to Python 2.7; you could run the version of IDLE with that version with:
/usr/bin/idle
Or you can install Pillow into Python 3.4 with:
python3.4 -m pip install Pillow
Upvotes: 2