先安装python pip。一种python包管理工具。
下面这篇文章讲的很详细。亲测可行。
https://ruter.github.io/2015/12/03/Update-python/
github的mtool安装方法
https://github.com/rueckstiess/mtools/wiki/mtools-Installation-on-Ubuntu-12.04
yum install python-setuptools
yum install freetype freetype-devel python-freetype
yum install libpng libpng-devel python-pypng
yum install python-devel
pip install mtools
yum install python-matplotlib
easy_install -U distribute