2014-03-28 44 views
1

我跟着这个指令:http://pillow.readthedocs.org/en/latest/installation.html#mac-os-x-installationOS X枕头安装错误

$ sudo pip install Pillow 

返回错误:

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future] 

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future 

error: command 'cc' failed with exit status 1 

---------------------------------------- 
Cleaning up... 
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-bAG3wP-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/Pillow 
Storing debug log for failure in /var/root/Library/Logs/pip.log 

pip.log

Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 122, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 283, in run 
    requirement_set.install(install_options, global_options, root=options.root_path) 
    File "/Library/Python/2.7/site-packages/pip/req.py", line 1435, in install 
    requirement.install(install_options, global_options, *args, **kwargs) 
    File "/Library/Python/2.7/site-packages/pip/req.py", line 706, in install 
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) 
    File "/Library/Python/2.7/site-packages/pip/util.py", line 697, in call_subprocess 
    % (command_desc, proc.returncode, cwd)) 
InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-bAG3wP-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/Pillow 

请帮帮我!

更新:

我之前安装了PIL。安装后,我尝试了一些黑魔法来使PIL与libjpeg一起工作。然后我尝试重新安装PIL。它已被卸载,但未能安装。

+0

看起来你无法进行编译。你在OSX 10.9上吗?关于同样的问题有几个话题。尝试用'xcode-select --install'来安装/更新你的xcode。 – pekapa

+0

是的,10.9。我应该重新安装xcode吗?它现在是最新的。 – Antonio

+1

我试过'xcode-select --install'并按'Update'。它返回错误:“无法安装,因为通过更新服务器更新是不可用的”(从俄语松散翻译) – Antonio

回答

4

运行XCode 5.1时似乎有些问题。当installing pycrypto有同样的问题。

试试这个:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install Pillow