首页
Preview

解决Failed building wheel for dlib

报错如下:

Building wheels for collected packages: dlib
  Building wheel for dlib (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for dlib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running bdist_wheel
      running build
      running build_ext
      Traceback (most recent call last):
        File "<frozen runpy>", line 198, in _run_module_as_main
        File "<frozen runpy>", line 88, in _run_code
        File "C:\Users\chris\AppData\Local\Temp\pip-build-env-x541emus\overlay\Scripts\cmake.exe\__main__.py", line 4, in <module>
      ModuleNotFoundError: No module named 'cmake'

      ERROR: CMake must be installed to build dlib

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for dlib
Failed to build dlib
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (dlib)

我们可以先查看下自己当前的py版本

PS E:\ComfyUI> .\python_embeded\python.exe --version
Python 3.11.8

然后前往https://github.com/z-mahmud22/Dlib_Windows_Python3.x ,下载对应版本的文件,比如我的是dlib-19.24.1-cp311-cp311-win_amd64.whl

下载好后直接安装就行

PS E:\ComfyUI> .\python_embeded\python.exe -m pip install .\dlib-19.24.1-cp311-cp311-win_amd64.whl
Processing e:\comfyui\dlib-19.24.1-cp311-cp311-win_amd64.whl
Installing collected packages: dlib
Successfully installed dlib-19.24.1

版权声明:本文内容由TeHub注册用户自发贡献,版权归原作者所有,TeHub社区不拥有其著作权,亦不承担相应法律责任。 如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

点赞(0)
收藏(0)
wvdl
关于阿里的技术创新均呈现于此.

评论(0)

添加评论