美文网首页
centos 安装matplotlib出现的问题

centos 安装matplotlib出现的问题

作者: 第八共同体 | 来源:发表于2017-10-16 22:18 被阅读0次

1.pip install matplotlib

纯洁环境跑该命令的时候是非常慢的,保不及会包超时错误,
所以pip换了一个国内的源
mkdir ~/.pip
touch pip.conf
修改pip.conf内容:

[global]
trusted-host =  pypi.douban.com
index-url = http://pypi.douban.com/simple

再次跑pip install matplotlib第二个报错

2.fatal error: Python.h: No such file or directory...error: command 'gcc' failed with exit status 1

具体信息如下:

_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

安装相应的devel就行了
yum install python-devel
再次跑pip install matplotlib即可。

相关文章

网友评论

      本文标题:centos 安装matplotlib出现的问题

      本文链接:https://www.haomeiwen.com/subject/dooluxtx.html