Mac osx lion,virtualenv,pil install - gcc错误 [英] Mac osx lion, virtualenv, pil install - gcc error
问题描述
pip`
执行gcc-4.0:没有这样的文件或目录
错误:命令'gcc-4.0'失败与退出状态1
`
easy_install 无法执行gcc-4.0:没有这样的文件或目录
错误:设置脚本退出,错误:命令'gcc-4.0'失败,退出状态1
home brew 错误:执行失败:python setup.py build_ext
我不太确定从这里去哪里。
谢谢,
CG
Xcode 4.1在OS X Lion 10.7不再包含 gcc-4.0
,就像在早期版本的OS X中所做的那样。当安装包含C扩展模块的PIL这样的Python包时,Python的Distutils将尝试使用相同版本的C编译器,Python本身正在构建。这听起来像是用来创建你的的版本。virtualenv
是一个旧的32位的Python,它用 gcc-4.0
。您可以通过在 virtualenv
中启动 python
来确定。如果它说 gcc-4.0
,您将需要重新创建virtualenv,使用较新的基础Python,即Apple提供的Pythons在Lion中或安装较新的python使用python.org安装程序或brew食谱。然后为该Python安装分发
和 pip
和 virtualenv
创建一个新的virutalenv然后安装PIL。
I have just completed the xcode install, mac osx lion. Upon completion I attempted to install PIL in a virtual enviroment using pip, easy_install and home brew. All three are erring out. pip install give the following error:
pip `
unable to execute gcc-4.0: No such file or directory
error: command 'gcc-4.0' failed with exit status 1
`
easy_install unable to execute gcc-4.0: No such file or directory
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1
home brew Error: Failed executing: python setup.py build_ext
I am not really sure where to go from here.
Thanks, CG
Xcode 4.1 on OS X Lion 10.7 no longer includes gcc-4.0
as it did in earlier versions of OS X. When you install a Python package like PIL that includes a C extension module, Python's Distutils will attempt to use the same version of the C compiler that that Python itself was build with. It sounds like the version of Python that was used to create your virtualenv
is an older 32-bit-only Python built with gcc-4.0
. You can tell for sure by starting the python
in your virtualenv
. If it says gcc-4.0
, you will need to re-create the virtualenv, using a newer base Python, either one of the Apple-supplied Pythons in Lion or installing a newer python using a python.org installer or a brew recipe. Then install Distribute
and pip
and virtualenv
for that Python, create a new virutalenv and then install PIL in it.
这篇关于Mac osx lion,virtualenv,pil install - gcc错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!