安装numpy pandas matplotlib seaborn scipy

安装numpy pandas matplotlib seaborn scipy

首先必须安装一些依赖包
yum -y install blas blas-devel lapack-devel lapack
yum -y install seaborn scipy
yum -y install freetype freetype-devel libpng libpng-devel

用豆瓣的pypi源,比官方下载速度快一些
pip install matplotlib -i http://pypi.douban.com/simple
错误提示:Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/matplotlib
使用命令:yum install python-matplotlib -y
ok

pip install numpy -i  http://pypi.douban.com/simple
提示:Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/python27/lib/python2.7/site-packages
Cleaning up...
证明该模块已经安装,下一步

pip install pandas -i http://pypi.douban.com/simple
Successfully installed pandas python-dateutil pytz six
Cleaning up...

pip install seaborn scipy
错误提示:Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/matplotlib
忽略该错误

pip install scikit-learn
Successfully installed scikit-learn
Cleaning up...

查看安装情况:

pip freeze
numpy==1.11.1
pandas==0.18.1
python-dateutil==2.5.3
pytz==2016.4
requests==2.10.0
scikit-learn==0.17.1
scipy==0.17.1
six==1.10.0
wheel==0.29.0
wsgiref==0.1.2
xgboost==0.4a30

yum info installed |  grep matplotlib
Name        : python-matplotlib
URL         : http://sourceforge.net/projects/matplotlib

python

>>> import xgboost
>>> import pandas
>>> import numpy

OK


参考:
http://youerning.blog.51cto.com/10513771/1711008
http://www.aichengxu.com/view/38553

你可能感兴趣的:(机器学习,Python)