Windows电脑Python里安装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 ╰─> [6 lines of output] running bdist_wheel running build running build_ext 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: Could not build wheels for dlib, which is required to install pyproject.toml-based projects
这个错误信息表明安装 dlib
包时失败,因为你的系统上没有安装 CMake。
解决方法:
下载安装CMake,官网链接:Download CMake
下载适合你电脑的版本并安装,然后重新启动cmd终端界面,再去输入pip install命令安装依赖包就可以了。