桃园剑客 2020-04-29 11:02 采纳率: 0%
浏览 1187
已结题

DLIB安装: import dlib 的时候,出现错误码。

PYTHONA编译的时候,import dliB出现错误码:3221225501
图片说明

运行环境:
1 dlib-19.17.99-cp37-cp37m-win_amd64.whl, anaconda cp37
2 python下,import cmake,import boost 都正常
help('modules')下有DLIB模块
可直接联系:15381935500 (微信手机)

调试过程:安装低版本DLIB19.0 . SETUP.PY出现

图片说明

具体:

(base) C:\Users\Administrator\Desktop\dlib-19.0\dlib-19.0>python setup.py instal
l
running install
running bdist_egg
running build
Detected Python architecture: 64bit
Detected platform: win32
Removing build directory C:\Users\Administrator\Desktop\dlib-19.0\dlib-19.0./to
ols/python/build
Configuring cmake ...
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 6.1.7601.
-- 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: E:/VC/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64
/cl.exe
-- Check for working C compiler: E:/VC/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: E:/VC/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x
64/cl.exe
-- Check for working CXX compiler: E:/VC/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x
64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - failed
CMake Warning at D:/anaconda/Library/share/cmake-3.14/Modules/FindBoost.cmake:17
99 (message):
No header defined for python-py34; skipping header check
Call Stack (most recent call first):
C:/Users/Administrator/Desktop/dlib-19.0/dlib-19.0/dlib/add_python_module:60 (
FIND_PACKAGE)
CMakeLists.txt:6 (include)
-- Could NOT find Boost
-- Could NOT find Boost
-- Found PythonLibs: D:/anaconda/libs/python37.lib (found suitable version "3.7.
6", minimum required is "3.4")
-- ****************************************************************************


-- We couldn't find the right version of boost python. If you installed boost a
nd you are still getting this error then you might have installed a version of b
oost that was compiled with a different version of visual studio than the one yo
u are using. So you have to make sure that the version of visual studio is the
same version that was used to compile the copy of boost you are using.
-- Set the BOOST_ROOT and BOOST_LIBRARYDIR environment variables before running
cmake.
-- E.g. Something like this:
-- set BOOST_ROOT=C:\local\boost_1_57_0

-- set BOOST_LIBRARYDIR=C:\local\boost_1_57_0\stage\lib

-- You will also likely need to compile boost yourself rather than using one of
the precompiled
-- windows binaries. Do this by going to the folder tools\build\ within boost
and running
-- bootstrap.bat. Then run the command:
-- b2 install
-- And then add the output bin folder to your PATH. Usually this is the C:\boo
st-build-engine\bin
-- folder. Finally, go to the boost root and run a command like this:
-- b2 -a --with-python address-model=64 toolset=msvc runtime-link=static
-- When it completes, set BOOST_LIBRARYDIR equal to wherever b2 put the compile
d libraries.
-- Note that you will need to set the address-model based on if you want a 32 o

r 64bit python library.

-- Next, when you invoke cmake to compile dlib you may have to use cmake's -G o
ption to set the
-- 64 vs. 32bit mode of visual studio. Also, if you want a Python3 library you
will need to
-- add -DPYTHON3=1. You do this with a statement like:
-- cmake -G "Visual Studio 12 2013 Win64" -DPYTHON3=1 ....\tools\python
-- Rather than:
-- cmake ....\tools\python

-- Which will build a 32bit Python2 module by default on most systems.

-- ****************************************************************************


CMake Error at C:/Users/Administrator/Desktop/dlib-19.0/dlib-19.0/dlib/add_pytho
n_module:108 (message):
Boost python library not found.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Administrator/Desktop/dlib-19.0/dlib-19.0/tools/python/build/
CMakeFiles/CMakeOutput.log".
See also "C:/Users/Administrator/Desktop/dlib-19.0/dlib-19.0/tools/python/build/
CMakeFiles/CMakeError.log".
error: cmake configuration failed!


  • 写回答

2条回答 默认 最新

  • threenewbee 2020-04-29 11:05
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置