【问题标题】:How can I fix "Could not build wheels for scikit-image" error?如何修复“无法为 scikit-image 构建轮子”错误?
【发布时间】:2023-01-04 13:26:56
【问题描述】:

我正在安装 scikit-image ,在安装过程中会抛出 wheel 编译错误。

 Platform      :
    Architecture: x64
    Compiler    : msvc

  CPU baseline  :
    Requested   : 'min'
    Enabled     : none
    Flags       : none
    Extra checks: none

  CPU dispatch  :
    Requested   : 'max -xop -fma4'
    Enabled     : none
    Generated   : none
  CCompilerOpt.cache_flush[809] : write cache to path -> C:\Users\dimit\AppData\Local\Temp\pip-install-aq2rykzx\scikit-image_b1ce32750a55476abaacce9574e7b7cb\build\temp.win-amd64-3.10\Release\ccompiler_opt_cache_ext.py    
  ----------------------------------------
  ERROR: Failed building wheel for scikit-image
Failed to build scikit-image
ERROR: Could not build wheels for scikit-image, which is required to install pyproject.toml-based projects

完整日志:https://paste-bin.xyz/18767

【问题讨论】:

  • 我建议下载并安装whl file,而不是尝试进行源代码编译。问题是目前还没有用于 python 3.10 的 scikit-image 的官方 whl 文件。或者,您可以降级到 python 3.9
  • 正如所建议的那样,我已经手动安装了 scikit_image-0.18.3-cp310-cp310-win_amd64.whl。安装成功,但是当我尝试导入 skimage 时,出现错误:Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'skimage'
  • 您能否确认您使用C:\Program Files\Python310\python.exe -m pip install 安装了 whl,然后还使用C:\Program Files\Python310\python.exe 运行了您的脚本?

标签: python pip scikit-image


【解决方案1】:

https://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-image 下载合适的文件

并使用 pip,将文件安装为:pip install *.whl

对我来说,在 Python 3.11 中工作pip install scikit_image-0.19.3-cp311-cp311-win_amd64.whl --user

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-03-30
    • 2021-08-04
    • 1970-01-01
    • 2016-08-29
    • 1970-01-01
    • 2020-01-19
    • 2023-04-04
    • 1970-01-01
    相关资源
    最近更新 更多