`
lg70124752
  • 浏览: 59761 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Ubuntu下安装scikit-learn(sklearn)

 
阅读更多
按说,这个安装应该也不是很困难,但是官方网站的说明在我看来写的实在是有待改进,所以写文一篇,方便以后安装。


背景:

Ubuntu 13.04

python 2 .7. 4(系统预装)


步骤:

官方原文见此链接


1. 安装支持部分:

在terminal里面直接输入以下命令,这个命令会安装sklearn所需要的依赖,主要包括 scipy, numpy一些主流依赖。

[html] view plaincopy在CODE上查看代码片派生到我的代码片
sudo apt-get install build-essential python-dev python-numpy python-setuptools python-scipy libatlas-dev libatlas3-base 

1.1 强烈推荐安装(选装):
这个会安装画图依赖包 matplotlib,这个包基本上都会用到,所以就一起装吧。

sudo apt-get install python-matplotlib

2. 安装sklearn

2.1 安装pip, pip是一个给python用的挺不错的安装工具。

sudo apt-get install python-pip
2.2 安装sklearn

pip install -U scikit-learn

好了,done!

作为检验,在terminal里面输入

pip list
这个会列出pip安装的所有东西,如果里面有sklearn这一项,应该就是大功告成了!
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics