我剛剛從雪豹升級到獅子,和一箇舊的Python C擴展,我不得不更新不想正確編譯。我真的不知道該在這裏做什麼。任何人可以幫助我,所以它編譯好嗎?它在Snow Leopard中編譯得很好。「......無法弄清楚......的架構類型」問題編譯Python的C擴展與海灣合作委員會
Home:folder Me$ python setup.py build
running build
running build_ext
building 'ccookies' extension
gcc -fno-strict-aliasing -fno-common -dynamic -arch ppc -arch i386 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c ccookies.c -o build/temp.macosx-10.3-fat-2.7/ccookies.o
llvm-gcc-4.2: error trying to exec '/Developer/usr/bin//../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
In file included from /usr/include/architecture/i386/math.h:630,
from /usr/include/math.h:28,
from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyport.h:312,
from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:58,
from ccookies.c:5:
/usr/include/AvailabilityMacros.h:109:14: warning: #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid.
lipo: can't figure out the architecture type of: /var/folders/_t/yg4wppss5fv6dkmh89_6ykm40000gn/T//cc3Cgr3v.out
error: command 'gcc' failed with exit status 255
是的,安裝32/64位2.7.2版本解決了它。非常感謝! – c00kiemonster
太好了。順便說一句,如果你打算使用Tkinter或IDLE,你也應該安裝最新的ActiveState Tcl/Tk 8.5。蘋果提供的10.7版本仍然有一些舊的錯誤。 –
感謝提示 – c00kiemonster