0

我正在尝试在我的 django 应用程序中使用 PIL/Pillow,在 virtualenv 中运行,最终部署到 Heroku。

我已经完成的步骤:

  • 启动 virtualenv (source venv/bin/activate)
  • 点安装枕头

输出:

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

否则,有很多复制的文件:例如copying PIL/__init__.py -> build/lib.macosx-10.9-intel-2.7/PIL

但是,运行 python manage.py runserver 失败并在标题中显示错误消息。试过 pip install pil 还是不行。关于如何修复的任何提示?

4

2 回答 2

4

更新:哦找到了答案

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

未使用的参数阻止了枕头的进一步安装。上面告诉它不要将未使用的参数视为错误。

发现于(阅读更多):无法在 OS X 上安装 mysql gem

于 2014-04-01T00:24:23.723 回答
0

我对 virtualenv 和 Django 有同样的问题,下面的命令修复了这个问题:

easy_install PIL
于 2014-08-12T07:14:33.677 回答