The single line that I am trying to run is the following:
from PIL import Image
However simple this may seem, it gives an error:
Traceback (most recent call last):
File "C:\...\2014-10-22_12-49.py", line 1, in <module>
from PIL import Image
File "C:\pyzo2014a\lib\site-packages\PIL\Image.py", line 29, in <module>
from PIL import VERSION, PILLOW_VERSION, _plugins
ImportError: cannot import name 'VERSION'
In case that's helpful, I installed pillow from https://pypi.python.org/pypi/Pillow/2.6.1 (file Pillow-2.6.1.win-amd64-py3.4.exe) before running this (before that there was already som PIL install, which I uninstalled). The script is run in Pyzo with Python version 3.4.1.
What is going wrong, how can I import Image?
C:\pyzo2014a\lib\site-packages\PIL\__init__.pycontains constants likeVERSION,PILLOW_VERSIONetc? For the record, my__init__.pyis 58 lines long, same (2.6.1) Pillow version. - user707650VERSION = '1.1.7'andPILLOW_VERSION = '2.6.1', these seem to be the only constants. 58 lines here as well. - BetohakuPILon yourPYTHONPATH. Try something likepython3.4 -c "import PIL; print(PIL.__file__)". - user707650