Python Pillow 已安装,但在导入时出现“没有名为枕头的模块”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23834663/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Pillow installed, but getting "no module named pillow" when importing
提问by billrichards
I installed the Pillow
package with:
我安装了Pillow
软件包:
python -m pip install pillow
Got success message (Successfully installed pillow
). Closed and re-opened the terminal.
收到成功消息 ( Successfully installed pillow
)。关闭并重新打开终端。
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
如果python -m pip install pillow
再次运行,它会说
Requirement already satisfied (use --upgrade to upgrade): pillow in c:\python27\lib\site-packages