求助dlib的安装

发布于 2022-09-07 19:47:31 字数 4359 浏览 7 评论 0

想安装测试https://github.com/ageitgey/f...
得先装dlib,系统是64位win10,安装了最新版的python3.7,cmake3.12,dlib19.15(据说最新的dlib不需boots支持了,就没安装boots),用python setup.py install 编译dlib错误如下:

搞了很多总方式,都不对,求助求助!
(自己是搞php的,对人脸识别很感兴趣,C++开发很手生)

Building extension for Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
Invoking CMake setup: 'cmake E:\dlib-19.15\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\dlib-19.15\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=C:\Users\87328\AppData\Local\Programs\Python\Python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=E:\dlib-19.15\build\lib.win-amd64-3.7 -A x64'
CMake Error in CMakeLists.txt:
  Generator

    NMake Makefiles

  does not support platform specification, but platform

    x64

  was specified.


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "E:/dlib-19.15/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "setup.py", line 257, in <module>
    'Topic :: Software Development',
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install.py", line 67, in run
    self.do_egg_install()
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\bdist_egg.py", line 172, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\bdist_egg.py", line 158, in call_command
    self.run_command(cmdname)
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\distutils\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 133, in run
    self.build_extension(ext)
  File "setup.py", line 170, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "C:\Users\87328\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 328, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'E:\\dlib-19.15\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\\dlib-19.15\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=C:\\Users\\87328\\AppData\\Local\\Programs\\Python\\Python37\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=E:\\dlib-19.15\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文