Installation 在MAC上安装PIL

Installation 在MAC上安装PIL,installation,python-imaging-library,Installation,Python Imaging Library,我正在尝试在Mac中安装PIL。我正在使用以下命令: sudo pip install pil --allow-external pil --allow-unverified pil 但它给出了以下错误 Command "/Users/akira/anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-bCxMjA/pil/setup.py';exec(compile(ge

我正在尝试在Mac中安装PIL。我正在使用以下命令:

sudo pip install pil --allow-external pil --allow-unverified pil
但它给出了以下错误

Command "/Users/akira/anaconda/bin/python -c "import setuptools,     tokenize;__file__='/private/tmp/pip-build-bCxMjA/pil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-YwCGxg-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-bCxMjA/pil

请注意,我的系统中安装了condo。我无法以任何方式在我的系统中安装PIL。请帮助我。我浏览了许多链接,但没有解决方案适合我。

如果安装了
conda
,为什么要使用
pip
?我只是用以下命令安装了它:

conda install pil
或者如果您想要最新版本(因为PIL现在被称为枕头):


我在升级我的pip时遇到了类似的问题,下面是我所做的(MacOS10.11,PythonVer2.7.11)

1.下载PIl: (ver1.1.6与python 2.7更兼容,ver1.1.7有很多问题)

2.在您的终端中运行此代码(cd到您的下载目录)

3.使用“pip列表”检查您的PIL。如果您安装了pillow,则只能使用其中一个。因此,如果您只想使用PIL,请通过卸载pillow

sudo -s    
pip uninstall pillow

@akira,请用勾选按钮接受足够的答案。它值得你再重复两次。
$ tar xvfz Imaging-1.1.6.tar.gz
$ cd Imaging-1.1.6
$ python setup.py install
sudo -s    
pip uninstall pillow