求助 python3.7 安装dlib失败

csdnaccount_by 2019-08-22 07:29:21
求助求助,我已经安装了VS2019


Cmake


Boost


安装dlib19.16和19.14均不成功

c:\python3.7\dlib-19.16>python setup.py install
running install
running bdist_egg
running egg_info
creating dlib.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
writing manifest file 'dlib.egg-info\SOURCES.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'
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.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)]
Invoking CMake setup: 'cmake c:\python3.7\dlib-19.16\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\python3.7\dlib-19.16\build\lib.win32-3.7 -DPYTHON_EXECUTABLE=C:\python3.7\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\python3.7\dlib-19.16\build\lib.win32-3.7'
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17134.
-- The C compiler identification is MSVC 19.22.27905.0
-- The CXX compiler identification is MSVC 19.22.27905.0
-- Check for working C compiler: E:/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: E:/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/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: E:/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: E:/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/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:/python3.7/python.exe (found version "3.7.4")
CMake Error at C:/python3.7/dlib-19.16/dlib/external/pybind11/tools/FindPythonLibsNew.cmake:122 (message):
Python config failure: Python is 32-bit, chosen compiler is 64-bit
Call Stack (most recent call first):
C:/python3.7/dlib-19.16/dlib/external/pybind11/tools/pybind11Tools.cmake:16 (find_package)
C:/python3.7/dlib-19.16/dlib/external/pybind11/CMakeLists.txt:33 (include)


-- Configuring incomplete, errors occurred!
See also "C:/python3.7/dlib-19.16/build/temp.win32-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "setup.py", line 257, in <module>
'Topic :: Software Development',
File "C:\python3.7\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\python3.7\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\python3.7\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\python3.7\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\python3.7\lib\site-packages\setuptools\command\install.py", line 67, in run
self.do_egg_install()
File "C:\python3.7\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "C:\python3.7\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\python3.7\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\python3.7\lib\site-packages\setuptools\command\bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "C:\python3.7\lib\site-packages\setuptools\command\bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "C:\python3.7\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\python3.7\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\python3.7\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "C:\python3.7\lib\distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "C:\python3.7\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\python3.7\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:\python3.7\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'c:\\python3.7\\dlib-19.16\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=c:\\python3.7\\dlib-19.16\\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=C:\\python3.7\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=c:\\python3.7\\dlib-19.16\\build\\lib.win32-3.7']' returned non-zero exit status 1.
...全文
853 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
月光白魔鬼 2020-02-19
  • 打赏
  • 举报
回复
另 参考 https://blog.csdn.net/wss794/article/details/84316686 下载对应.whl 有问题可以问我 成功后 给分就行
月光白魔鬼 2020-02-19
  • 打赏
  • 举报
回复 1
看我的博客 https://blog.csdn.net/qq_32651235/article/details/103015872
铖邑 2019-08-22
  • 打赏
  • 举报
回复
Python config failure: Python is 32-bit, chosen compiler is 64-bit 你可以换64位的Python,或者安装32位的dlib

37,721

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧