我一直在寻找这个问题的答案,但我找不到,所以它就在这里。
我正在尝试使用以下命令将包含setup.py文件的Uniconvertor安装到MacOS X Lion (Python2.7.2)中:
python setup.py install然后我得到以下错误代码:
running install
running build
running build_py
running build_ext
building 'uniconvertor.app.modules.streamfilter' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -O2 -DNDEBUG -g -O3 -arch i386 -arch x86_64 -DMAJOR_VERSION=1 -DMINOR_VERSION=1 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/modules/filter/streamfilter.c -o build/temp.macosx-10.6-intel-2.7/src/modules/filter/streamfilter.o
unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1我在Developer/usr/bin文件夹中查找了'gcc-4.2‘文件,但是没有找到,但是有一个'llvm-gcc.4.2’文件,它让我觉得应该把编译器从'gcc-4.2‘改为'llvm-gcc.4.2’。
我是Mac的新手,我不知道还能怎么解决这个问题。
谢谢。
编辑:
我尝试使用:
cd /Developer/usr/bin
ln -s llvm-gcc-4.2 gcc-4.2我得到了更多的进展,但随后出现了一个新的错误:
running install_lib
creating /Library/Python/2.7/site-packages/uniconvertor
error: could not create '/Library/Python/2.7/site-packages/uniconvertor': Permission denied这种“权限被拒绝”的原因可能是什么?
我正在使用管理员帐户运行它,它没有要求输入密码或其他任何东西。
再次感谢您。
发布于 2012-07-26 01:21:43
尝试以下操作:
发布于 2012-01-09 03:03:53
我能够通过下载其中的一个解决这个问题:https://github.com/kennethreitz/osx-gcc-installer/releases
发布于 2017-01-20 04:23:53
对于较新版本的OS X(包括macOS),您只需打开终端并输入:
xcode-select --installhttps://stackoverflow.com/questions/8473066
复制相似问题