关于python2.7中matplotlib模块的安装

用easy-install安装matplotlib时报错:

                        * The following required packages can not be built:  
                        * freetype
error: Setup script exited with 1
那就安装freetye和png这两个库:
sudo apt-get install libfreetype6-dev
sudo apt-get install libpng12-dev
另外还需安装几个matplotlib依赖的几个模块:
sudo easy_install numpy
sudo easy_install tornado
sudo easy_install pyparsing

你可能感兴趣的:(Python笔记)