使用pip install 或者easy_install安装Python的各种包出现cc failed with exit status 1
2015-05-24 14:15
926 查看
遇到的问题
如果你在Mac上用pip install或者easy_install安装Python的各种package的时候遇到如题的问题的话,看到这篇随笔应该会解决问题了。之前都是在vps上直接安装使用的python框架和包,没想到在Mac上安装的时候出现了这个麻烦,最先想到的是看看百度上有没有人有同样的问题,结果很失望。虽然有这个问题但是没有给出有用的答案,只能求助于Google了。
解决的方法
首先你需要安装上developer tools,我当时就忘了这个茬。安装developer tools很简单,只需要在terminal输入以下的命令即可。xcode-select --install
下面如果还是报错的话就是OSX自身的机制的问题了(是什么机制我也没仔细看,要想知道自行Google吧),这里只要输入两行命令让它对于不懂的东西闭嘴就行了。
export CFLAGS=-Qunused-arguments export CPPFLAGS=-Qunused-arguments
要是还没解决的话我就帮不了咯。
这里再加上在Linux上会遇到的同样的问题,可以试试install 一个libffi-devel,应该能结局问题。
相关文章推荐
- CentOS7上 pip install MySQL-python 安装失败(error: command 'gcc' failed with exit status 1)的解决办法
- 关于pip install安装python依赖包时报错:command 'gcc' failed with exit status 1的解决方案
- 关于Python安装模块出现error: command 'gcc' failed with exit status 1错误的解决方法
- centos7 安装mysql--python模块出现EnvironmentError: mysql_config not found和error: command 'gcc' failed with exit status 1
- 用安装python模块出现error: command 'gcc' failed with exit status 1 ,实际已经安装了gcc的,还是报错,然后发觉是failed不是not found,这说明这个错误个gcc没多大关系,应该是缺少某些功能模块,执行如下操作:
- Python使用pip install psycopg2安装psycopg2包出现python setup.py egg_info failed with error code 1 in /tmp/pip-build-YtLeN3/psycopg2错误处理
- 安装python-MySQLdb 出现error: command 'gcc' failed with exit status 1的解决方法
- MAC安装python模块碰到“error: command 'cc' failed with exit status 1”解决办法
- 安装python模块时出现:error: Setup script exited with error: command 'gcc' failed with exit status 1
- 在Mac上安装pyspider时出现 error: command 'cc' failed with exit status 1 的解决方法
- Centos4.3安装MySQL-python-1.2.3,出现error: command 'gcc' failed with exit status 1
- 安装MySQL-python-1.2.3c1出现“error: command 'gcc' failed with exit status 1”错误
- 安装python模块时出现:error: Setup script exited with error: command 'gcc' failed with exit status 1
- [Python]安装PIL出现command 'gcc' failed with exit status 1错误
- 安装MySQL-python时发生错误:error: command 'gcc' failed with exit status 1
- 使用easy_install时报错如下: error: Setup script exited with error: command ‘gcc’ failed with exit status 1
- 安装MySQL-python时发生错误:error: command 'gcc' failed with exit status 1
- mac下安装mysql-python包报unable to execute llvm-gcc-4.2: No such file or directory error: command 'llvm-gcc-4.2' failed with exit status 1解决方法
- [CentOS]安装MySQL-python,error: Setup script exited with error: command 'gcc' failed with exit status
- 安装MySQL-python时发生错误:error: command 'gcc' failed with exit status 1