python3.11安装dlib库出错

ALE*_* TL 1 python cmake dlib

我在 Windows 10\n版本 Windows 10 家庭单语言\n版本 22H2\n安装在 \xe2\x80\x8e13-\xe2\x80\x8e07-\xe2\x80\x8e2022\n操作系统版本 19045.2251\n体验 Windows 功能时遇到问题体验包120.2212.4180.0

\n

我安装了 cmake\n\xe2\x9e\x9c cmake --version\ncmake 版本 3.24.0-rc3

\n

CMake 套件由 Kitware 维护和支持

\n

我安装了 python 3.11\n\xe2\x9e\x9c py --version\nPython 3.11.0

\n

我尝试使用 pip 安装 dlib\n我收到的错误已上传到 Pastebin

\n
File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\command\\bdist_egg.py", line 151, in call_command\n    self.run_command(cmdname)\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\_distutils\\cmd.py", line 319, in run_command\n    self.distribution.run_command(command)\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\dist.py", line 1217, in run_command\n    super().run_command(command)\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\_distutils\\dist.py", line 987, in run_command\n    cmd_obj.run()\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\command\\install_lib.py", line 11, in run\n    self.build()\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\_distutils\\command\\install_lib.py", line 112, in build\n    self.run_command(\'build_ext\')\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\_distutils\\cmd.py", line 319, in run_command\n    self.distribution.run_command(command)\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\dist.py", line 1217, in run_command\n    super().run_command(command)\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\_distutils\\dist.py", line 987, in run_command\n    cmd_obj.run()\n  File "C:\\Users\\alent\\Downloads\\dlib-19.24\\setup.py", line 134, in run\n    self.build_extension(ext)\n  File "C:\\Users\\alent\\Downloads\\dlib-19.24\\setup.py", line 174, in build_extension\n    subprocess.check_call(cmake_build, cwd=build_folder)\n  File "C:\\Program Files\\Python311\\Lib\\subprocess.py", line 413, in check_call\n    raise CalledProcessError(retcode, cmd)\nsubprocess.CalledProcessError: Command \'[\'cmake\', \'--build\', \'.\', \'--config\', \'Release\', \'--\', \'/m\']\' returned non-zero exit status 1.\n
Run Code Online (Sandbox Code Playgroud)\n

https://pastebin.com/8N5kb75D

\n

然后我尝试从源代码构建它\n所以我从https://github.com/davisking/dlib/releases/tag/v19.24下载了最新版本\n我收到的错误已上传到pastebin\n https:// Pastebin.com/YjiVTMEp

\n

请帮助我。\n感谢您对此进行调查。

\n

当我尝试从源代码构建它时,我得到https://pastebin.com/YjiVTMEp \n当我尝试使用 pip 安装时,我得到https://pastebin.com/8N5kb75D

\n

ALE*_* TL 7

是的。我使用 python3.11 成功了您所需要做的就是

  1. 使用克隆存储库 git clone https://github.com/davisking/dlib
  2. 使用cmd进入目录 cd dlib
  3. 确保您有使用 c++ 进行 Visual Studio 桌面开发 这是图像
  4. 从https://cmake.org/download/安装 cmake
  5. 使用pip安装cmake py -m pip install cmake
  6. 然后尝试安装 dlib py setup.py install

如果这有效,请投票我的解决方案。谢谢