gpt4 book ai didi

python - 安装枕头错误

转载 作者:行者123 更新时间:2023-11-30 23:23:33 25 4
gpt4 key购买 nike

我正在尝试同步数据库我克隆的新项目。安装要求后,我注意到我需要安装 PIL 或 Pillow 才能让syncdb 正常工作。

这是我运行pip installpillow时发生的情况:

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

搜索堆栈后,我尝试执行以下命令:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
sudo -E pip install pillow

最终得到:

In file included from _imagingtk.c:19:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found

# include <X11/Xlib.h>

^

1 error generated.

error: command 'cc' failed with exit status 1

至少没有 clang ,但枕头仍然不起作用。我尝试过一些其他方法,包括忽略标志等,但它们似乎都无法在我的 virtualenv 中工作。知道我能做什么吗?我正在运行 Mavericks 10.9.2

最佳答案

我正在使用 OS X El Capitan,这对我有用。

  1. 关闭 virtualenv 事件终端窗口。
  2. 打开新终端并运行sudo xcode-select --install,需要一些时间才能完成。
  3. 完成后打开一个新终端并运行 pip install Pillow

关于python - 安装枕头错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23918955/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com