0


【版本安装】最新版本|还在开发的版本sklearn安装方式

记录

    对于有些还处在开发版本的库,我们是无法通过简单的pip调用的,比如sklearn的所有版本(2022.10.30)如下:![](https://img-blog.csdnimg.cn/9db52c90d7064e0cbacd4b9429630c91.png) 

对于scikit-learn 1.2.dev0 与 **scikit-learn1.1.3(stable) **这两个版本来讲,直接pip是找不到包的。

ERROR: Ignored the following versions that require a different python version: 1.1.0 Requires-Python >=3.8; 1.1.0rc1 Requires-Python >=3.8; 1.1.1 Requires-Python >=3.8; 1.1.2 Requires-Python >=3.8; 1.1.3 Requires-Python >=3.8
ERROR: Could not find a version that satisfies the requirement scikit-learn==1.1.0 (from versions: 0.9, 0.10, 0.11, 0.12, 0.12.1, 0.13,
 0.13.1, 0.14, 0.14.1, 0.15.0b1, 0.15.0b2, 0.15.0, 
0.15.1, 0.15.2, 0.16b1, 0.16.0, 0.16.1, 0.17b1, 0.17, 
0.17.1, 0.18, 0.18.1, 0.18.2, 0.19b2, 0.19.0, 0.19.1, 0.19.2, 0.20rc1, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.20.4, 0.21rc2, 0.21.0, 0.21.1, 0.21.2,
 0.21.3, 0.22rc2.post1, 0.22rc3, 0.22, 0.22.1, 0.22.2,
0.22.2.post1, 0.23.0rc1, 0.23.0, 0.23.1, 0.23.2, 0.24.dev0, 
0.24.0rc1, 0.24.0, 0.24.1, 0.24.2, 1.0rc1, 1.0rc2, 1.0, 1.0.1, 1.0.2)
ERROR: No matching distribution found for scikit-learn==1.1.0
  **  可以看到,Pip是寻找不到scikit-learn1.0.2以上版本的包的。**

【版本安装】最新版本|还在开发的版本sklearn安装方式


安装命令

安装scikit-learn==1.2.dev0

pip install --pre --extra-index https://pypi.anaconda.org/scipy-wheels-nightly/simple scikit-learn

安装scikit-leran==1.1.3(stable)

pip

必须保证python>=3.7.1

pip install -U scikit-learn

conda(强烈推荐这种新建一个环境的方式)

conda create -n sklearn-env -c conda-forge scikit-learn
conda activate sklearn-env

为了检查您的安装,您可以使用

conda list scikit-learn  # to see which scikit-learn version is installed
conda list  # to see all packages installed in the active conda environment
python -c "import sklearn; sklearn.show_versions()"

本文转载自: https://blog.csdn.net/qq_51831335/article/details/127596186
版权归原作者 大气层煮月亮 所有, 如有侵权,请联系我们删除。

“【版本安装】最新版本|还在开发的版本sklearn安装方式”的评论:

还没有评论