作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
[在]:
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 的版本,它们满足所需的范围。
pip uninstall -y enum34
然后我就可以安装 sklearn_extra
最佳答案
我试过,pip install scikit-learn-extra
这对我来说似乎没问题
!
关于python - sklearn_extra 安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59618368/
[在]: from sklearn_extra.cluster import KMedoids [出去]: ModuleNotFoundError: No module named 'sklearn_
我是一名优秀的程序员,十分优秀!