haimen
haimen

Reputation: 2015

Could not find version error during install Imblearn in python

I am trying to install Imblearn for doing SMOTE in python. I have been trying to install imblearn package for sometime. But I am constantly getting errors. The following are the commands that I have tried,

pip install imblearn

pip install git+https://github.com/fmfn/UnbalancedDataset

And following is the error that I am getting,

Collecting imblearn
  Using cached https://files.pythonhosted.org/packages/81/a7/4179e6ebfd654bd0eac0b9c06125b8b4c96a9d0a8ff9e9507eb2a26d2d7e/imblearn-0.0-py2.py3-none-any.whl
Collecting imbalanced-learn (from imblearn)
  Using cached https://files.pythonhosted.org/packages/e0/87/39a4cecebc7fb9ddb433fe8bc7f76379b4918a0ade91f8a1423dc25c7ddc/imbalanced-learn-0.5.0.tar.gz
Requirement already satisfied: numpy>=1.11 in 
Requirement already satisfied: scipy>=0.17 in 
Collecting scikit-learn>=0.21 (from imbalanced-learn->imblearn)
  ERROR: Could not find a version that satisfies the requirement scikit-learn>=0.21 (from imbalanced-learn->imblearn) (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.18rc2, 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.21rc2)
ERROR: No matching distribution found for scikit-learn>=0.21 (from imbalanced-learn->imblearn)

Because of this I am not able to proceed my modeling part as my data is heavily imbalanced. Can anybody please help me in installing this package? if not, what are the alternate ways to do SMOTE in python ?

Upvotes: 1

Views: 8896

Answers (2)

silver
silver

Reputation: 3

the pip install command has changed. It is as below

https://pypi.org/project/scikit-learn/0.21.0/

Upvotes: 0

gpk27
gpk27

Reputation: 829

Scikit-learn 0.20 was the last version to support Python2.7. Scikit-learn 0.21 and later require Python 3.5 or newer.

Refer to the following link:

https://pypi.org/project/scikit-learn/0.21.0/

I would recommend using Python3

Upvotes: 4

Related Questions