python - sklearn_extra 安装问题

标签 python scikit-learn installation package sklearn-pandas

[在]:

from sklearn_extra.cluster import KMedoids
[出去]:
ModuleNotFoundError: No module named 'sklearn_extra'
然后,我尝试通过安装 sklearn_extra
[在]:
python -m pip install sklearn_extra
[出去]:
ERROR: Could not find a version that satisfies the requirement sklearn_extra (from versions: none)
ERROR: No matching distribution found for sklearn_extra
然后,我去了网站的安装部分( https://scikit-learn-extra.readthedocs.io/en/latest/install.html )并按照它说的做了:
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
[在]:
pip install https://github.com/scikit-learn-contrib/scikit-learn-extra/archive/master.zip
[出去]:
  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'
我检查了 Cython、Python 和 sklearn 的版本,它们满足所需的范围。
编辑:由于 Balraj Ashwatt 的评论,解决方案是为我卸载 enum34。
pip uninstall -y enum34
然后我就可以安装 sklearn_extra

最佳答案

我试过,
pip install scikit-learn-extra
这对我来说似乎没问题
!

关于python - sklearn_extra 安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59618368/

相关文章:

python - 如何修复 Django 中的 NoReverseMatch 问题?

python - 如何使用二维 bool 数组在 numpy 中逐行从一维数组中进行选择?

python - 控制 Scikit Learn 中逻辑回归的阈值

python - SKLearn 朴素贝叶斯 : add feature after tfidf vectorization

Clojure Leiningen 离线安装

installation - 构建运行另一个安装程序的安装程序

python - 如何在特定时间之间以固定间隔在 python 中运行任务?

python - 我如何在 Atom 中使用新的 ipython 内核?

python - 在 sklearn 中创建 TfidfTransformer 时, 'use_idf' 究竟做了什么?

linux - 如何构建和安装我已经安装在不同位置的同一个库