scikit-learn-contrib / imbalanced-learn

A Python Package to Tackle the Curse of Imbalanced Datasets in Machine Learning
https://imbalanced-learn.org
MIT License
6.85k stars 1.28k forks source link

ImportError: A sklearn version of at least 0.19.0 is required to use imbalanced-learn. 0.18.1 was found #426

Closed gtuzi closed 6 years ago

gtuzi commented 6 years ago

The title says the error itself. I am using minconda. scikit-learn version 0.19.1 installed through conda. This seems to be the latest version as of now. imbalanced-learn version 0.3.3 Using Jupyter, OS: Ubuntu 16.04

The error is

13 from sklearn.preprocessing import StandardScaler 14 from sklearn.utils import shuffle ---> 15 from imblearn.over_sampling import RandomOverSampler 16 from glob import glob 17 import pickle

/home/gtuzi/miniconda3/envs/platooning/lib/python3.5/site-packages/imblearn/init.py in () 29 from .version import _check_module_dependencies, version 30 ---> 31 _check_module_dependencies() 32 33 # Boolean controlling whether the joblib caches should be

/home/gtuzi/miniconda3/envs/platooning/lib/python3.5/site-packages/imblearn/version.py in _check_module_dependencies(is_imbalanced_dataset_installing) 100 module_name=module_name, 101 minimum_version=module_metadata['min_version'], --> 102 install_info=module_metadata.get('install_info'))

/home/gtuzi/miniconda3/envs/platooning/lib/python3.5/site-packages/imblearn/version.py in _import_module_with_version_check(module_name, minimum_version, install_info) 75 module_version=module_version) 76 ---> 77 raise ImportError(message) 78 79 return module

ImportError: A sklearn version of at least 0.19.0 is required to use imbalanced-learn. 0.18.1 was found. Please upgrade sklearn

gtuzi commented 6 years ago

Found out that the incorrect package was being pointed to, even though that was not showing in the conda list. Did a pip uninstall of the "invisible" package. Now conda points to the environment package.