可能重複:
How to use/install gcc on Mac OS X 10.8/Xcode 4.4無法在Mac上(GCC-4.0的錯誤)安裝Python包
使用easy_insall
或pip
我無法安裝,因爲以下的任何Python包,錯誤。我到處尋找,看到了這個錯誤的幾個變種,但還沒有找到易於理解/遵循的解決方案。任何幫助深表感謝!
我在Mac OS上運行10.8.1
Python版本2.7.3
的Xcode 4.5.2版本(安裝了命令行工具)
...如果您需要任何更多的信息爲了弄清楚問題,請詢問!
$ easy_install pil
Searching for pil
Reading http://pypi.python.org/simple/pil/
Reading http://www.pythonware.com/products/pil
Reading http://effbot.org/zone/pil-changes-115.htm
Reading http://effbot.org/downloads/#Imaging
Best match: PIL 1.1.7
Downloading http://effbot.org/media/downloads/PIL-1.1.7.tar.gz
Processing PIL-1.1.7.tar.gz
Writing /var/folders/9q/bvqtzkbx1hg1934b36zgk0y40000gn/T/easy_install-wfZs_Y/PIL-1.1.7/setup.cfg
Running PIL-1.1.7/setup.py -q bdist_egg --dist-dir /var/folders/9q/bvqtzkbx1hg1934b36zgk0y40000gn/T/easy_install-wfZs_Y/PIL-1.1.7/egg-dist-tmp-DXWOmC
WARNING: '' not a valid package name; please use only.-separated package names in setup.py
--- using frameworks at /System/Library/Frameworks
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
不知道這是否會有所幫助,但是當我運行sudo port select --list gcc
,我得到如下:
Available versions for gcc:
llvm-gcc42
mp-gcc45
none (active)
@jdi感謝您的鏈接......但正如我上面提到的,我已經安裝了最新版本的Xcode,並在Xcode首選項(這是該鏈接中接受的解決方案)中安裝了命令行工具。有任何想法嗎? – sgarza62
您是否檢查過您的/開發人員位置和/或其他位置以確定問題是您沒有將其包含在PATH中?運行這個:'find/usr/local/bin/Developer/-name「gcc」| grep「/ bin」 ' – jdi
@jdi當我運行它,我得到'find:/ Developer /:沒有這樣的文件或目錄' – sgarza62