[in]:
from sklearn_extra.cluster import KMedoids
[out]:
ModuleNotFoundError: No module named 'sklearn_extra'
Then, I tried installing sklearn_extra via
[in]:
python -m pip install sklearn_extra
[out]:
ERROR: Could not find a version that satisfies the requirement sklearn_extra (from versions: none)
ERROR: No matching distribution found for sklearn_extra
Then, I went to installation part of the website(https://scikit-learn-extra.readthedocs.io/en/latest/install.html) and did what it said:
Installation
Dependencies
scikit-learn-extra requires,
Python (>=3.5)
scikit-learn (>=0.21), and its dependencies
Cython (>0.28)
User installation
Latest development version can be installed with,
pip install https://github.com/scikit-learn-contrib/scikit-learn-extra/archive/master.zip
[in]:
pip install https://github.com/scikit-learn-contrib/scikit-learn-extra/archive/master.zip
[out]:
ERROR: Command errored out with exit status 1:
command: 'c:\users\m\appdata\local\programs\python\python37\python.exe' 'c:\users\m\appdata\local\programs\python\python37\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\m\AppData\Local\Temp\pip-build-env-yopprv13\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.28' numpy==1.14.5
cwd: None
Complete output (14 lines):
Traceback (most recent call last):
File "c:\users\m\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\m\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\users\m\appdata\local\programs\python\python37\lib\site-packages\pip\__main__.py", line 16, in <module>
from pip._internal.main import main as _main # isort:skip # noqa
File "c:\users\m\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\main.py", line 8, in <module>
import locale
File "c:\users\m\appdata\local\programs\python\python37\lib\locale.py", line 16, in <module>
import re
File "c:\users\m\appdata\local\programs\python\python37\lib\re.py", line 143, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
I checked versions of Cython,Python and sklearn they satisfy the required range.
Edit: the solution is to uninstall enum34 for me thanks to Balraj Ashwatt's comment.
pip uninstall -y enum34
Then I was able to install sklearn_extra
I tried,
pip install scikit-learn-extra
this seemed to work alright for me !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With