简体   繁体   English

无法在全新的Mac OS X Lion上安装pythonbrew

[英]Trouble installing pythonbrew on a brand new mac os x lion

I installed pythonbrew, but when I try to install python, I get an error: 我安装了pythonbrew,但是当我尝试安装python时,出现错误:

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

This is what it says in the log file: 日志文件中的内容如下:

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

I don't know where the config.log file is. 我不知道config.log文件在哪里。

Any ideas? 有任何想法吗?

It seems you have to install XCode from Apple so you get a C-Compiler: you can get it for free from the App-Store Xcode . 看来您必须从Apple安装XCode才能获得C编译器:您可以从App-Store Xcode免费获得它。

Unfortunately this is the only way I know of to get one - and it is a huge download. 不幸的是,这是我所知的唯一途径-而且下载量很大。

Mac OS X Lion doesn't include gcc by default -- and, in fact, you'll only have clang (the C frontend for LLVM) if you installed Xcode. Mac OS X Lion默认情况下不包含gcc -实际上,如果您安装了Xcode,则只有clang(LLVM的C前端)。 Assuming you have that installed, it looks like you can install Pythonbrew by passing the without-gcc flag to the configure script. 假设已经安装了该程序,则可以通过将no without-gcc标志传递给configure脚本来安装Pythonbrew。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM