这个问题在这里已有答案:
我也试过了
from PIL import Image
但它给了我ImportError:没有名为PIL的模块 .
我已经成功安装了PIL
pip install pil
我还安装了xcode命令行工具 . 似乎没什么用 .
Details :
Mac OS X 10.9
Python 2.7.6
python是/Library/Frameworks/Python.framework/Versions/2.7/bin/python
python是/ usr / bin / python
python是/ usr / local / bin / python
Name: PIL
版本:1.1.7
位置:/usr/local/lib/python2.7/site-packages/PIL
2 回答
PIL分布错误包装用于鸡蛋安装 .
相反,安装Pillow,友好的PIL叉 .
在安装了Python 2和3并且
pip2
-installed Pillow无法提供Image
的系统上,可以以解决ImportError: No module named Image
的方式安装PIL for Python 2:要么