我在试着用枕头。我遵循了这个站点上的安装说明:http://www.pythonforbeginners.com/gui/how-to-use-pillow
当我在终端窗口中键入以下内容时:
$ python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import Image
>>> 它没有给我任何错误,所以假设链接的网站是正确的,这意味着枕头是正确的安装。但是,当我尝试使用Python空闲的PIL库时,如下所示:
from PIL import ImagePython提供了一条错误消息:
Traceback (most recent call last):
File "/Sample_application.py",
line 3, in <module>
from PIL import Image
ImportError: No module named 'PIL'我做错了什么?我用的是mac 10.9小牛
发布于 2014-10-12 12:13:31
您的系统上至少有两个Python安装;默认系统--提供2.7和Python3.4。
您的pip命令绑定到Python2.7;您可以使用以下方法运行该版本的空闲版本:
/usr/bin/idle或者,您可以使用以下方法将Pillow安装到Python3.4中:
python3.4 -m pip install Pillowhttps://stackoverflow.com/questions/26316423
复制相似问题