I use this command in the shell to 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?
In shell, run:
pip install Pillow
Attention: PIL is deprecated, and pillow is the successor.
On some installs of PIL, you must do
import PIL (PIL is in fact not always imported this way). Since
import Image works for you, this means that you have in fact installed PIL.
Having a different name for the library and the Python module is unusual, but this is what was chosen for (some versions of) PIL.
You can get more information about how to use this module from the official tutorial.
PS: In fact, on some installs,
import PIL does work, which adds to the confusion. This is confirmed by an example from the documentation, as @JanneKarila found out, and also by some more recent versions of the MacPorts PIL package (1.1.7).
At first install Pillow with
pip install Pillow
or as follows
c:Python35>python -m pip install Pillow
Then in python code you may call
from PIL import Image
"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
This book introduces machine learning methods in finance. It features a unified treatment of machine learn...
Managing and analyzing data have always offered the greatest benefits and the greatest challenges for organizations of all sizes and across all industries. Businesses have long struggled with finding ...
Pandas 1.x Cookbook: Practical recipes for scientific computing, time series analysis, and exploratory data analysis using Python, 2nd Edition....
This is the first book on synthetic data for deep learning, and its extensive coverage could make this book the standard benchmark for synthetic data for years to come. The book can also serve as an i...