2011-06-12 33 views
0

安裝Python模塊I執行sudo蟒蛇的setup.py install來安裝Mongrel2 Python的支持,但它失敗,此: -問題上OSX 10.6,並與GCC 4.0和4.2

> Installed 
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- 
> packages/m2py-1.0beta7-py2.7.egg 
> Processing dependencies for 
> m2py==1.0beta7 Searching for storm 
> Reading 
> http://pypi.python.org/simple/storm/ 
> Reading https://storm.canonical.com 
> Reading 
> https://launchpad.net/storm/+download 
> Best match: storm 0.18 Downloading 
> http://launchpad.net/storm/trunk/0.18/+download/storm-0.18.tar.bz2 
> Processing storm-0.18.tar.bz2 Running 
> storm-0.18/setup.py -q bdist_egg 
> --dist-dir /tmp/easy_install-SLExAI/storm-0.18/egg-dist-tmp-kQRcFq In file included from 
> /usr/include/architecture/i386/math.h:626, 
>    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 storm/cextensions.c:23: 
> /usr/include/AvailabilityMacros.h:108:14: 
> warning: #warning Building for Intel 
> with Mac OS X Deployment Target < 10.4 
> is invalid. 
> /usr/libexec/gcc/powerpc-apple-darwin10/4.0.1/as: 
> assembler 
> (/usr/bin/../libexec/gcc/darwin/ppc/as 
> or 
> /usr/bin/../local/libexec/gcc/darwin/ppc/as) 
> for architecture ppc not installed 
> Installed assemblers are: 
> /usr/bin/../libexec/gcc/darwin/x86_64/as 
> for architecture x86_64 
> /usr/bin/../libexec/gcc/darwin/i386/as 
> for architecture i386 lipo: can't open 
> input file: /var/tmp//ccByYCOo.out (No 
> such file or directory) error: Setup 
> script exited with error: command 
> 'gcc-4.0' failed with exit status 1. 

我再重新運行它與sudo CC =/usr/bin/gcc-4.2 python setup.py安裝,但具有相同的結果。

我的Python 2.7.1安裝和上午在OSX 10.6運行

回答

4

看來你已經安裝的Xcode 4,你已經安裝了傳統的32位唯一的,向後兼容的Python 2.7.1,可能來自python.org。不幸的是,這兩者混合不好; Python是用Xcode 3構建的,並且需要Xcode 3.您可以備份到Xcode 3,或者更好地安裝64-bit/32-bit Python 2.7.x from here(2.7.2剛剛發佈,順便說一下)。

+0

安裝了64位的Python,並解決了問題。謝謝。 – JPT 2011-06-12 23:26:53

+0

不客氣。順便說一下,我已經更新了當前的python.org下載頁面,以包含關於Xcode 3與Xcode 4的腳註。 – 2011-06-12 23:56:23