Mac OS X 10.9之后无法安装PIL [英] Can't install PIL after Mac OS X 10.9
本文介绍了Mac OS X 10.9之后无法安装PIL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚将Mac OS更新到10.9,发现其中的某些(全部?)Python模块不再可用,尤其是Image.
I've just updated my Mac OS to 10.9 and I discovered that some (all?) of my Python modules are not here anymore, especially the Image one.
所以我尝试执行sudo pip install pil
,但是出现此错误:
So I try to execute sudo pip install pil
, but I get this error:
/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
我的Xcode是最新的,我不知道. PIL可能还不兼容10.9吗?
My Xcode is up-to-date and I don't have any idea. Is it possible that PIL is not yet 10.9 compatible ?
推荐答案
以下为我工作的东西:
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11 /usr/local/include/X11
sudo pip install pil
更新:
但是,威尔提供了以下更正确的解决方案.
But there is more correct solution below, provided by Will.
打开您的终端并执行:
xcode-select --install
open your terminal and execute:
xcode-select --install
这篇关于Mac OS X 10.9之后无法安装PIL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文