安装枕头(和PIL)时出错 [英] Error installing Pillow (and PIL)

查看:74
本文介绍了安装枕头(和PIL)时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我使用命令sudo pip install Pillow,它运行良好,直到清理阶段:(这是日志文件中的完整错误消息)

If i use the command sudo pip install Pillow, it runs fine until the cleaning up stage: (this is the full error message from the log file)

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...
Removing temporary dir /private/tmp/pip_build_root...
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-VaD2jT-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/Pillow
Exception information:
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,`enter code here` 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-VaD2jT-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/Pillow

我已经安装了xcode命令行工具.真的卡在这一个上了.

I have the xcode command line tools installed. Really stuck on this one.

----更新---- 跑brew doctor并清除所有错误.成功安装了所有Pillow必备组件.

----UPDATE---- Ran brew doctor and cleared all errors. Installed all Pillow prerequisites successfully.

这是填充pip.log文件: http://pastebin.com/08XD9JjM

Here is the fill pip.log file: http://pastebin.com/08XD9JjM

推荐答案

我遇到了同样的问题.似乎是Xcode 5.1发出的叮当声引起的问题.看这个问题的答案:

I got the same problem. It seems to be a problem caused by clang with Xcode 5.1. Look at the answer of this question:

OS X枕头安装错误

通过在该答案中使用命令来解决我的问题:

My problem is solved by using the command in that answer:

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

它引发了很多警告.但是一切都很好.

It throws a lot of warnings. But everything is fine.

这篇关于安装枕头(和PIL)时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆