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:
The current free version is PIL 1.1.7. This release supports Python 1.5.2 and newer, including 2.5 and 2.6. A version for 3.X will be released later.
Python Imaging Library (PIL)
Your python version is 3.4.1, PIL do not support!
Try import PIL
instead of from PIL import image
.
I had the same problem, pillow was installed with an environment.yml in anaconda
I am quickly learning that pip and setuptools must always be up to date or I will have problems. Always update these tools before installing packages.For any package import problem uninstall the package upgrade the listed tools(maybe even your base environment) and reinstall.
conda uninstall pillow
python -m pip install pip --upgrade
pip install setuptools --upgrade
pip install pillow
If using Anaconda, from the base environment first run the following before installing packages/environments:
conda update conda
Updating the base env is not required to fix this issue but is a good practice to avoid similar problems
@theeastcoastwest touched on the pip upgrade in their answer but I felt more information was needed
do from PIL import Image, ImageTk
In Ubuntu OS, I solved it with the followings commands
pip install Pillow
apt-get install python-imaging
And sorry, dont ask me why, it's up to me ;-)