简体   繁体   English

安装枕头OSX Mavericks

[英]Install pillow OSX Mavericks

I am trying to install Pillow on mavericks with no luck. 我试图在运气不好的特立独行者上安装枕头。

I have tried: 我努力了:

pip install Pillow

The install works great. 安装效果很好。

However I get the error: 但是我得到了错误:

ImportError: No module named PIL ImportError:没有名为PIL的模块

On this line of code in my script: 在我脚本的这一行代码中:

from PIL import Image, ImageFont, ImageDraw

I have no idea whats wrong. 我不知道怎么了 Ideas? 有想法吗?

@MattDMo was right. @MattDMo是正确的。

I had done brew install python to install python with homebrew leaving with system python and homebrew python. 我已经完成brew install python来安装带有自制软件的python,而剩下的是系统python和自制软件的python。

I removed that brew and did an easy_install pip , then pip install Pillow . 我删除了brew,并做了一个easy_install pip ,然后pip install Pillow

Everything is working great now 现在一切都很好

Just try: 你试一试:

import Image

In some installs, Import PIL works, in some others import Image is the one that works. 在某些安装中, Import PIL有效,在其他安装中, Import PIL import Image是有效的。

It is quite confusing. 这很令人困惑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM