当前位置: 动力学知识库 > 问答 > 编程问答 >

pillow installed, but "no module named pillow" - python2.7 - Windows 7 - python -m install pillow

问题描述:

Using python 2.7 on Windows 7

installed package pillow with

python -m pip install pillow

Got success message (Successfully installed pillow). Closed and re-opened cmd terminal.

But when I try to

import pillow

I get the error message

ImportError: No module named pillow

If python -m pip install pillow is run again, it says

Requirement already satisfied (use --upgrade to upgrade): pillow in c:\python27\lib\site-packages

网友答案:

Try using

import PIL

or

from PIL import ...

instead. 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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: