我正在尝试在MacOS10.13上安装Python PIL库。
我知道枕头,但我希望我的代码工作在谷歌应用引擎,只支持PIL。
我尝试过sudo pip install pil,得到的结果是:
Collecting pil
Could not find a version that satisfies the requirement pil (from versions: )
No matching distribution found for pil这让我感到困惑,因为pip search pil确实在结果中列出了PIL。尝试安装特定版本,如pil==1.1.6,得到相同的结果。编写PIL而不是pil也没有帮助。
我还试图给出一个显式的URL:sudo pip install http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz,但得到了一个编译器错误:
In file included from _imagingtk.c:19:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.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如何才能使此安装正常工作?
发布于 2017-12-14 12:06:26
我通过执行xcode-select --install解决了X11编译器错误
https://stackoverflow.com/questions/47744807
复制相似问题