关于Python安装模块出现error: command 'gcc' failed with exit status 1错误的解决方法
2017-08-15 14:28
2899 查看
当使用pip install ###时,有时会出现如标题上的问题,我遇到的问题如下:
这是我在安装matplotlib模块的时候出现的问题,重新安装了gcc等各种我能想到的,不过还是不行。到网上找了一下,说是其实安装一个对应的devel环境就可以了。
举个例子,我这里报错是
其实只要看include缺什么就行了,我缺的时Python.h,所以就安装以下python的devel环境就好
其他同类问题同理,对应下载相应的devel环境。
_posixsubprocess.c:3:20: fatal error: Python.h: No such file or directory #include "Python.h" ^ compilation terminated. error: command 'gcc' failed with exit status 1
这是我在安装matplotlib模块的时候出现的问题,重新安装了gcc等各种我能想到的,不过还是不行。到网上找了一下,说是其实安装一个对应的devel环境就可以了。
举个例子,我这里报错是
#include "Python.h" ^ compilation terminated. error: command 'gcc' failed with exit status 1
其实只要看include缺什么就行了,我缺的时Python.h,所以就安装以下python的devel环境就好
yum install python-devel
其他同类问题同理,对应下载相应的devel环境。
相关文章推荐
- 用安装python模块出现error: command 'gcc' failed with exit status 1 ,实际已经安装了gcc的,还是报错,然后发觉是failed不是not found,这说明这个错误个gcc没多大关系,应该是缺少某些功能模块,执行如下操作:
- 安装python模块时出现:error: Setup script exited with 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解决方法
- 安装python-MySQLdb 出现error: command 'gcc' failed with exit status 1的解决方法
- 在Mac上安装pyspider时出现 error: command 'cc' failed with exit status 1 的解决方法
- 安装python模块时出现:error: Setup script exited with error: command 'gcc' failed with exit status 1
- 安装MySQL-python时发生错误:error: command 'gcc' failed with exit status 1
- 安装MySQL-python-1.2.3c1出现“error: command 'gcc' failed with exit status 1”错误
- CentOs安装Scrapy出现error: Setup script exited with error: command ‘gcc’ failed with exit status 1错误解决方案
- 安装MySQL-python时发生错误:error: command 'gcc' failed with exit status 1
- 关于python 安装lxml-4.1.1 报 error: command 'gcc' failed with exit status 1
- MAC安装python模块碰到“error: command 'cc' failed with exit status 1”解决办法
- centos7 安装mysql--python模块出现EnvironmentError: mysql_config not found和error: command 'gcc' failed with exit status 1
- CentOs安装Scrapy出现error: Setup script exited with error: command ‘gcc’ failed with exit status 1错误解决方案
- CentOs安装Scrapy出现error: Setup script exited with error: command ‘gcc’ failed with exit status 1错误解决方案
- CentOS7上 pip install MySQL-python 安装失败(error: command 'gcc' failed with exit status 1)的解决办法
- [Python]安装PIL出现command 'gcc' failed with exit status 1错误
- 关于phonegap 安装出现 cmd :command failed with exit code 8错误的解决方法。
- Centos4.3安装MySQL-python-1.2.3,出现error: command 'gcc' failed with exit status 1
- python 安装superset:error: Setup script exited with error: command 'gcc' failed with exit status 1