Skip to content
Advertisement

Cant install imbalanced-learn on an Azure ML Environment

I have an Azure ML Workspace which comes by default with some pre-installed packages.

I tried to install

!pip install -U imbalanced-learn

But I got this error

Requirement already up-to-date: scikit-learn in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (0.24.2)
Requirement already satisfied, skipping upgrade: scipy>=0.19.1 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from scikit-learn) (1.4.1)
Requirement already satisfied, skipping upgrade: joblib>=0.11 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from scikit-learn) (0.14.1)
Requirement already satisfied, skipping upgrade: numpy>=1.13.3 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from scikit-learn) (1.18.5)
Requirement already satisfied, skipping upgrade: threadpoolctl>=2.0.0 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from scikit-learn) (2.1.0)
Collecting imbalanced-learn
  Using cached imbalanced_learn-0.9.0-py3-none-any.whl (199 kB)
Requirement already satisfied, skipping upgrade: threadpoolctl>=2.0.0 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from imbalanced-learn) (2.1.0)
Requirement already satisfied, skipping upgrade: joblib>=0.11 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from imbalanced-learn) (0.14.1)
Requirement already satisfied, skipping upgrade: scipy>=1.1.0 in /anaconda/envs/azureml_py36/lib/python3.6/site-packages (from imbalanced-learn) (1.4.1)
ERROR: Could not find a version that satisfies the requirement scikit-learn>=1.0.1 (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.0.1 (from imbalanced-

learn)

Not sure how to solve this, I have read in other posts to use conda, but that didnt work either.

Advertisement

Answer

scikit-learn 1.0.1 and up require Python >= 3.7; you use Python 3.6. You need to upgrade Python or downgrade imbalanced-learn. imbalanced-learn 0.8.1 allows Python 3.6 so

!pip install -U "imbalanced-learn < 0.9"
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement