Could not find a version that satisfies the requirement scikit-learn>=1.1.0 (from imbalanced-learn)

错误展示

ERROR: Could not find a version that satisfies the requirement scikit-learn>=1.1.0 (from imbalanced-learn) (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) ERROR: No matching distribution found for scikit-learn>=1.1.0 (from imbalanced-learn)

本地环境是
在 notebook 上检测环境的代码

import platform; print(platform.platform())
import sys; print("Python", sys.version)
import numpy; print("NumPy", numpy.__version__)
import scipy; print("SciPy", scipy.__version__)
import sklearn; print("Scikit-Learn", sklearn.__version__)
import imblearn; print("imblearn", imblearn.__version__)

Could not find a version that satisfies the requirement scikit-learn>=1.1.0 (from imbalanced-learn)_第1张图片

解决方案

conda install -c conda-forge imbalanced-learn

运行之后还是没有安装上,进而运行以下代码

pip install --upgrade scikit-learn
conda install -c conda-forge imbalanced-learn

安装好了,环境变为:
Could not find a version that satisfies the requirement scikit-learn>=1.1.0 (from imbalanced-learn)_第2张图片

你可能感兴趣的:(工程能力,scikit-learn,python,机器学习)