我希望在 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
为什么我被告知该版本是最新版本,而显然不是?
要apt-get
安装任何库的最新版本,还必须更新apt-get
。要执行此操作,请运行
apt-get update
这将更新apt-get
中的依赖项,然后运行命令。
最后,
我通过以root
身份登录,然后使用以下方法明确指定版本来执行此操作
conda install scikit-learn=0.20.3