2012-01-18 59 views
0

我安装pythonbrew,而是一个全新的Mac OS X狮子安装pythonbrew当我尝试安装Python,我得到一个错误:麻烦的

ERROR: Failed to install Python-3.2.1. See /Volumes/Documents/Users/nathan/.pythonbrew/log/build.log to see why. 

这是它在日志文件中说:

checking for --enable-universalsdk... no 
checking for --with-universal-archs... 32-bit 
checking MACHDEP... darwin 
checking machine type as reported by uname -m... x86_64 
checking for --without-gcc... no 
checking for gcc... no 
checking for cc... no 
checking for cl.exe... no 
configure: error: in `/Volumes/Documents/Users/nathan/.pythonbrew/build/Python-3.2.1': 
configure: error: no acceptable C compiler found in $PATH 
See `config.log' for more details 

我不知道config.log文件在哪里。

任何想法?

回答

1

看来你必须从Apple安装XCode,以便获得一个C编译器:你可以免费从App Store Xcode获得它。

不幸的是,这是我知道得到的唯一途径 - 这是一个巨大的下载。

+0

对于某些人来说,Pythonbrew也不会干净地安装,即使使用Xcode。你可以在这里找到更多:https://github.com/utahta/pythonbrew/issues/37 – 2012-01-18 16:07:50

+0

我现在给xcode一个尝试。任何其他Python版本管理器工作得更好? – Nathan 2012-01-18 16:22:45

+0

我用virtualenv包装的自制软件。但是...我确实安装了XCode 4.2,所以我不知道如果没有它,你是否可以得到它。 – lukecampbell 2012-01-18 16:37:21

0

Mac OS X Lion在默认情况下不包含gcc - 事实上,如果您安装了Xcode,则只有clang(LLVM的C前端)。假设你已经安装了,看起来你可以通过将without-gcc标志传递给configure脚本来安装Pythonbrew。

+0

我目前不在Mac上 - 但我认为XCode实际上也会带有gcc以及...我必须稍后再检查。 – BergmannF 2012-01-18 16:07:38

+0

@Gjallar:最新版本的Xcode没有。 – mipadi 2012-01-18 16:11:21