python的pil库安装失败_安装Python的PIL库时出错

安装xcode之后,我执行了pip install Pillow,最后的代码字符串是:In file included from _imagingtk.c:19:

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

In file included from Tk/tkImaging.c:52:

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

# include

^

1 error generated.

1 error generated.

Building using 4 processes

cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.9-intel-2.7/_imagingtk.o build/temp.macosx-10.9-intel-2.7/Tk/tkImaging.o -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib -L/usr/X11/lib -L/usr/lib -o build/lib.macosx-10.9-intel-2.7/PIL/_imagingtk.so -framework Tcl -framework Tk

clang: error: no such file or directory: 'build/temp.macosx-10.9-intel-2.7/_imagingtk.o'

clang: error: no such file or directory: 'build/temp.macosx-10.9-intel-2.7/Tk/tkImaging.o'

error: command 'cc' failed with exit status 1

----------------------------------------

Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build/Pillow/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-YMhwsU-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build/Pillow

Storing complete log in /var/root/Library/Logs/pip.log

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值