亲测有效!!!
1.安装numpy
apt-get install python-numpy
apt-get install python-scipy
2.安装matplotlib
(1)首先安装matplotlib依赖的包libpng和freetype。
a.安装libpng:
sudo apt-get install libpng-dev
b.安装freetype:
1)cd ~/下载
2)wget http://ftp.twaren.net/Unix/NonGNU//freetype/freetype-2.6.5.tar.gz
注:可到http://ftp.twaren.net/Unix/NonGNU//freetype下载最新版本。
3)tar zxvf freetype-2.6.5.tar.gz
4)cd freetype-2.6.5/
5)./congfigure
6)make
7)sudo make install
8)sudo apt-get install python-pip
注:若安装过pip可跳过 8)步骤。
9)sudo pip search matplotlib
注:查找matplotlib和查看其安装状态
c.安装matplotlib:
sudo pip install matplotlib