LEO-max 2020-05-15 04:03 采纳率: 0%
浏览 538

Windows系统安装dlib模块总是报错

我按照网上的教程,下载好了CMake和dlib模块的压缩包,并将CMake的环境
变量配置好了。但是在DOS窗口中,进入dlilb文件,python setup.py install
的时候,老是报错。

C:\dlib-19.19.0>python setup.py install
running install
running bdist_egg
running egg_info
writing dlib.egg-info\PKG-INFO
writing dependency_links to dlib.egg-info\dependency_links.txt
writing top-level names to dlib.egg-info\top_level.txt
package init file 'dlib\__init__.py' not found (or not a regular file)
reading manifest file 'dlib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'tools\python\build*'
no previously-included directories found matching 'dlib\test'
writing manifest file 'dlib.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
Building extension for Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)]
Invoking CMake setup: 'cmake C:\dlib-19.19.0\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\dlib-19.19.0\build\lib.win32-3.8 -DPYTHON_EXECUTABLE=C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\dlib-19.19.0\build\lib.win32-3.8'
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.25.28614.0
-- The CXX compiler identification is MSVC 19.25.28614.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Users/邹成智/AppData/Local/Programs/Python/Python38-32/python.exe (found version "3.8")
CMake Error at C:/dlib-19.19.0/dlib/external/pybind11/tools/FindPythonLibsNew.cmake:124 (message):
  Python config failure: Python is 32-bit, chosen compiler is 64-bit
Call Stack (most recent call first):
  C:/dlib-19.19.0/dlib/external/pybind11/tools/pybind11Tools.cmake:16 (find_package)
  C:/dlib-19.19.0/dlib/external/pybind11/CMakeLists.txt:33 (include)


-- Configuring incomplete, errors occurred!
See also "C:/dlib-19.19.0/build/temp.win32-3.8/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "setup.py", line 223, in <module>
    setup(
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\command\install.py", line 67, in run
    self.do_egg_install()
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\command\bdist_egg.py", line 172, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\command\bdist_egg.py", line 158, in call_command
    self.run_command(cmdname)
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 135, in run
    self.build_extension(ext)
  File "setup.py", line 172, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "C:\Users\邹成智\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\dlib-19.19.0\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\dlib-19.19.0\\build\\lib.win32-3.8', '-DPYTHON_EXECUTABLE=C:\\Users\\邹成智\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\dlib-19.19.0\\build\\lib.win32-3.8']' returned non-zero exit status 1.

我搞了整整一天了,试多种办法还是不行,请大佬帮帮忙

我的是win10+VS2019+Python3.8+cmake-3.17.2-win64-x64+dlib-19.19.0

  • 写回答

1条回答 默认 最新

  • threenewbee 2020-05-15 09:25
    关注

    Python config failure: Python is 32-bit, chosen compiler is 64-bit
    让你安装python x64版呢,你现在安装的是32bit版

    评论

报告相同问题?

悬赏问题

  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端