2012-01-12 76 views
2

Possible Duplicate:
Installing Python Imaging Library (PIL) on Snow Leopard with updated Python 2.6.2PIL安裝失敗丟失:STDARG.H

乳寧MAC 10.7.2嘗試安裝PIL,解決許多問題的gcc後,安裝退出這一行:

/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory

我是使用這一行安裝:

env ARCHFLAGS="-arch i386 -arch x86_64" easy_install PIL 

全輸出:

WARNING: '' not a valid package name; please use only.-separated package names in setup.py --- using frameworks at /System/Library/Frameworks In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4, from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85, from _imaging.c:75: /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory _imaging.c:3017: warning: initialization from incompatible pointer type _imaging.c:3077: warning: initialization from incompatible pointer type In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4, from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85, from _imaging.c:75: /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory _imaging.c:3017: warning: initialization from incompatible pointer type _imaging.c:3077: warning: initialization from incompatible pointer type lipo: can't figure out the architecture type of: /var/folders/2l/nrkm12097b58kk8n9hrbtz840000gn/T//cckCPEox.out error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1

+2

恐怕沒有一個可以幫助我。並且從2011年5月開始有更新,指出該解決方案不適用於10.7。我還注意到人們在過去幾天中報告了這個問題...... – 2012-01-12 09:20:32

回答

6

問題解決了,步驟我了:

第1步:卸載並安裝Xcode的,這裏建議: http://binarylionstudios.com/blog/2011/01/30/error-stdarg.h-no-such-file-or-directory/

刪除的Xcode properlly遵循這樣的回答: How to fully remove Xcode 4

sudo /Developer/Library/uninstall-devtools --mode=all

使用安裝Xcode.app後重新啓動您的mac

第2步:的Xcode後重新安裝,安裝失敗

unable to execute gcc-4.2: No such file or directory PIL

解決,我跟着這個帖子: http://aravir-rose.blogspot.com/2011/12/installing-python-27s-imaging-library.html

祝你好運!