I have a script that is written in Python. The author decided to use new features only available in Python 3, so I had to update my version.
Now I am having trouble because the script crashes on an import statement, so I decided to do some debugging. I came to the conclusion that my Python 3 cannot import Image
from PIL
.
In Python 2:
Python 2.7.10 (default, Aug 22 2015, 20:33:39)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import Image
Does not give an error, but in Python 3:
Python 3.5.0 (v3.5.0:374f501f4567, Sep 12 2015, 11:00:19)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import Image
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'PIL'
Why is this happening and how can I fix this?