CentOS7 安装psutil模块失败command 'gcc' failed with exit status 1

CentOS安装psutil包:
python版本:3.6
 
wget https://pypi.python.org/packages/source/p/psutil/psutil-3.2.1.tar.gz --no-check-certificate
tar zxvf psutil-3.2.1.tar.gz
cd psutil-3.2.1
python setup.py install
 
执行python setup.py install时报错:
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_VERSION=321 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
unable to execute gcc: Not a directory
error: command ‘gcc‘ failed with exit status 1
 
1、缺少gcc依赖环境  安装gcc
yum -y install gcc
2.缺少python-devel包
yum install python-devel -y
总结:安装过程中,可能仍存在其它的环境依赖包情况。解决的思路----缺啥补啥。

CentOS7 安装psutil模块失败command 'gcc' failed with exit status 1

上一篇:ffmpeg 视频截图


下一篇:模板继承