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?
if you use anaconda:
I recently installed Leap. I Tried openshot and it didn't start. So came here and found a suggestion to start from the Terminal to see if there were any error.
The error I had was
error missing mlt
. So I installed thepython-mlt
module from Yast and imported it, tried to start but next openshot saidmissing pil.
I Followed the Pillow suggestion to install because Yast couldn't find any pil and imported pil. That went ok but did not start and showed
Error missing goocanvas
.The I installed
goocanvas
with Yast, imported it in python, and Openshot fired up !!With a lot of errors in the terminal like
missing Vimeoclient
and lots ofattributeerrors
. Well, will see if it is of any influence working with it.I had the same problem and i fixed it by checking what version pip (
pip3 --version
) is, then realizing I'm typingpython<uncorrect version> filename.py
instead ofpython<correct version> filename.py
instead of PIL use Pillow it works
or
On some installs of PIL, You must do
instead of
import PIL
(PIL is in fact not always imported this way). Sinceimport 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).