安装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

python

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

OK


参考:

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值