【问题标题】:ERROR: Could not build wheels for scikit-learn, which is required to install pyproject.toml-based projects错误:无法为 scikit-learn 构建轮子,这是安装基于 pyproject.toml 的项目所必需的
【发布时间】:2023-04-04 11:41:01
【问题描述】:

当我在命令提示符下运行此命令时

C:\Users\Sayan Saha>pip install scikit-learn

我收到此错误:

ERROR: Could not build wheels for scikit-learn, which is required to install pyproject.toml-based projects

【问题讨论】:

  • 你的python版本是多少可以在cmd里输入python --version
  • 我得到了-Python 3.10.1
  • 来自documentation 我可以看到它不支持python 3.10

标签: python scikit-learn


【解决方案1】:

你能做什么去这个URL并搜索Scikit-learn。支持python 3.10的wheel文件

您可以下载的文件有两种类型的文件

  1. scikit_learn-0.24.2-cp310-cp310-win_amd64.whl

  2. scikit_learn-0.24.2-cp310-cp310-win32.whl

所以根据你的python位版本你可以下载wheel文件

并给出在 cmd 中安装的完整路径,例如(这适用于 Python 64-bit 所以):

pip install filepath\scikit_learn‑0.24.2‑cp310‑cp310‑win_amd64.whl

1.0.1 版本根据 python 版本安装文件,pip 命令如上。

scikit_learn‑1.0.1‑cp310‑cp310‑win32.whl
scikit_learn‑1.0.1‑cp39‑cp39‑win_amd64.whl

【讨论】:

  • 之后我得到这个: ImportError: DLL load failed while importing _openmp_helpers: The specified module could not be found.
  • 你的python位版本是多少
  • win32上是64位,[MSC v.1929 64位(AMD64)]
  • 你可以试试这个thread来自 SO!
  • 是的,你当时拿了那个文件并安装它,我认为列表中没有 1.0.1 轮文件
猜你喜欢
  • 2022-01-22
  • 2022-01-09
  • 1970-01-01
  • 2022-06-29
  • 2022-11-20
  • 2022-11-24
  • 2022-08-06
  • 2022-11-08
  • 2022-08-17
相关资源
最近更新 更多