I use this command in the shell to install PIL:
easy_install PIL
then I run python
and type this: import PIL
. But I get this error:
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named PIL
I've never had such problem, what do you think?
you have to install Image and pillow with your python package.
type
or run command prompt (in windows), then navigate to the scripts folder
then run below command
Sometimes I get this type of error running a Unitest in python. The solution is to uninstall and install the same package on your virtual environment.
Using this commands:
and
If for any reason you get an error, add sudo at the beginning of the command and after hitting enter type your password.
At first install Pillow with
or as follows
Then in python code you may call
"Pillow is a fork of PIL, the Python Imaging Library, which is no longer maintained. However, to maintain backwards compatibility, the old module name is used." From pillow installed, but "no module named pillow" - python2.7 - Windows 7 - python -m install pillow
On windows, try checking the path to the location of the PIL library. On my system, I noticed the path was
after renaming the
pil
folder toPIL
, I was able to load the PIL module.On Windows, you need to download it and install the .exe
https://pypi.python.org/pypi/Pillow/2.7.0
This worked for me on Ubuntu 16.04:
I found this on Wikibooks after searching for about half an hour.