更新sklearn for python3不是最新版本

时间:2019-05-28 15:19:04

标签: python scikit-learn install apt-get

我打算在Ubuntu中更新sklearn的版本,并被告知它是最新版本,但是我知道有较新的版本。

从命令行输入

sudo apt-get install python3-sklearn-lib

然后我收到一条消息,提示

Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-sklearn-lib is already the newest version (0.17.0-4).
python3-sklearn-lib set to manually installed.
The following packages were automatically installed and are no longer required:
  libpython-all-dev libpython-dev libpython2.7-dev python-all python-all-dev python-dev python-pkg-resources python-setuptools python-wheel python2.7-dev
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

但是我知道sklearn网站上的最新版本是0.21.1

为什么有人告诉我该版本是最新版本,但显然不是?

2 个答案:

答案 0 :(得分:0)

要让apt-get安装任何库的最新版本,apt-get也必须进行更新。为此运行

apt-get update

这将更新apt-get内部的依赖性,然后运行您的命令。

答案 1 :(得分:0)

最后,我以root的身份登录,然后使用以下命令明确指定版本

conda install scikit-learn=0.20.3