安装Python的psutil模块时报错:error: command 'gcc' failed with exit status 1
2016-11-17 14:02
661 查看
安装Python的psutil模块:
gcc包已装,缺少python-devel包
解决:
tar zxvf psutil-2.0.0.tar.gz cd psutil-2.0.0 python setup.py install报错:
running install running bdist_egg ...... psutil/_psutil_linux.c:12:20: error: Python.h: No such file or directory In file included from psutil/_psutil_linux.c:23: psutil/_psutil_linux.h:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token ...... psutil/_psutil_linux.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token psutil/_psutil_linux.c: In function ‘ioprio_get’: psutil/_psutil_linux.c:50: warning: implicit declaration of function ‘syscall’ psutil/_psutil_linux.c: At top level: psutil/_psutil_linux.c:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token ...... psutil/_psutil_linux.c:384: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PsutilMethods’ psutil/_psutil_linux.c:421: error: expected specifier-qualifier-list before ‘PyObject’ psutil/_psutil_linux.c: In function ‘init_psutil_linux’: psutil/_psutil_linux.c:470: error: ‘PyObject’ undeclared (first use in this function) psutil/_psutil_linux.c:470: error: (Each undeclared identifier is reported only once psutil/_psutil_linux.c:470: error: for each function it appears in.) psutil/_psutil_linux.c:470: error: ‘module’ undeclared (first use in this function) psutil/_psutil_linux.c:470: warning: implicit declaration of function ‘Py_InitModule’ psutil/_psutil_linux.c:470: error: ‘PsutilMethods’ undeclared (first use in this function) error: command 'gcc' failed with exit status 1原因:
gcc包已装,缺少python-devel包
解决:
yum install python-devel -y
相关文章推荐
- python安装模块的时候报错error: command 'gcc' failed with exit status 1
- 安装python模块时出现:error: Setup script exited with 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 psutil 编译中断。 error: command 'gcc' failed with exit status 1
- 安装MySQL-python时发生错误:error: command 'gcc' failed with exit status 1
- Centos4.3安装MySQL-python-1.2.3,出现error: command 'gcc' failed with exit status 1
- 安装MySQL-python报错error: command 'gcc' failed with exit status 1
- pip安装模块时:error: command 'gcc' failed with exit status 1
- 安装MySQL-python-1.2.3c1出现“error: command 'gcc' failed with exit status 1”错误
- 安装python-MySQLdb 出现error: command 'gcc' failed with exit status 1的解决方法
- python爬虫问题:error: command 'gcc' failed with exit status 1
- [原创] ubuntu下安装scrapy报错 error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
- centos6.6下安装MySQLdb时出现“error command 'gcc' failed with exit status 1”
- python Error Message: 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模块出现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
- 关于Python安装模块出现error: command 'gcc' failed with exit status 1错误的解决方法
- MAC安装python模块碰到“error: command 'cc' failed with exit status 1”解决办法
- centos7.2安装paramiko报error: command 'gcc' failed with exit status 1的解决办法