You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

无法安装scikit-learn-extra包的问题求助

无法安装scikit-learn-extra包的问题求助

各位大佬好,我最近遇到了个棘手的问题,想请大家帮忙支支招:

我从合作者那里拿到了一个依赖scikit-learn-extra库的Python文件,但在我的Windows机器上怎么都装不上这个库,而合作者用Linux系统就能正常安装使用。

尝试1:用pip直接安装

我执行pip install scikit-learn-extra后,直接抛出了构建失败的错误,核心报错信息如下:

error: subprocess-exited-with-error

× Building wheel for scikit-learn-extra (pyproject.toml) did not run successfully.
│ exit code: 1
...
running build_ext
building 'sklearn_extra.utils._cyfht' extension
error: Microsoft Visual C++ 14.0 or greater is required.
...
ERROR: Could not build wheels for scikit-learn-extra, which is required to install pyproject.toml-based projects

我已经尝试安装了更高版本的Microsoft Visual C++构建工具,但还是没能解决这个问题。

尝试2:源码安装

我还下载了scikit-learn-extra的源码仓库,运行python setup.py install,结果又遇到了新的错误:

Traceback (most recent call last):
File "C:\Users\bogda\Desktop\scikit-learn-extra-main\setup.py", line 8, in <module>
from Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'

有没有朋友知道在Windows环境下怎么顺利安装这个库呀?比如有没有预编译的wheel可以直接用,或者其他绕过编译的办法?

备注:内容来源于stack exchange,提问作者BOGDAN DONICI

火山引擎 最新活动