python 安装第三方模块 报错

python 安装第三方模块
刚开始使用python3安装第三方模块报出系统错误
SyntaxError: Missing parentheses in call to ‘print’
原因:用python3.x的版本运行只能在python2.x运行的脚本,在python3 里的print是要加括号的,2版本没有

后来用python2安装,又报错:
fatal error: Python.h: No such file or directory
error: command ‘gcc’ failed with exit status 1
可以看出是缺了gcc
解决方法:yum install python-devel
如果是3.x版本报这样的错,那就yum install python3-devel

猜你喜欢

转载自blog.csdn.net/miss_audrey/article/details/79664918