摘自:http://litchiware.github.io/centos/2015/07/05/centos7%E4%B8%8B%E5%AE%89%E8%A3%85numpy+matplotlib+scipy/
1、安装numpy
安装numpy的依赖包
sudo yum install gcc-gfortran sudo yum install blas-devel sudo yum install lapack-devel sudo yum install python-devel
安装numpy
sudo pip install numpy
2、安装matplotlib
安装matplotlib的依赖包
sudo yum install freetype-devel.x86_64
sudo yum install libpng-devel.x86_64
安装g++编译器并确保与gcc编译器版本一致
sudo yum install gcc-c++ gcc --version g++ --version
若没有安装g++或者版本不一致时会报如下错误:
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
安装matplotlib
sudo pip install matplotlib
3、安装scipy
sudo pip install scipy