win10 64位+python安装dlib

double_vane 2017-07-06 03:03:35
系统:win10 64位
python 64位
安装dlib时出现以下情况:
Collecting dlib
Using cached dlib-19.4.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command d:\pyanaconda\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\lenovo\\appdata\\local\\temp\\pip-build-ups5vr\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\users\lenovo\appdata\local\temp\tmpuqy6vfpip-wheel- --python-tag cp27:
running bdist_wheel
running build
Detected Python architecture: 64bit
Detected platform: win32
Configuring cmake ...
-- The C compiler identification is MSVC 18.0.21005.1
-- The CXX compiler identification is MSVC 18.0.21005.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Boost
-- Found PythonLibs: D:/pyanaconda/libs/python27.lib (found suitable version "2.7.12", minimum required is "2.6")
-- *****************************************************************************************************
-- We couldn't find the right version of boost python. If you installed boost and you are still getting this error then you might have installed a version of boost that was compiled with a different version of visual studio than the one you 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:\boost-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 compiled libraries.
-- Note that you will need to set the address-model based on if you want a 32 or 64bit python library.
--
-- Next, when you invoke cmake to compile dlib you may have to use cmake's -G option 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/lenovo/AppData/Local/Temp/pip-build-ups5vr/dlib/dlib/cmake_utils/add_python_module:116 (message):
Boost python library not found.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)
-- Configuring incomplete, errors occurred!
See also "C:/Users/lenovo/AppData/Local/Temp/pip-build-ups5vr/dlib/tools/python/build/CMakeFiles/CMakeOutput.log".
error: cmake configuration failed!

----------------------------------------
Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
Complete output from command d:\pyanaconda\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\lenovo\\appdata\\local\\temp\\pip-build-ups5vr\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\lenovo\appdata\local\temp\pip-j4coio-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
Detected Python architecture: 64bit
Detected platform: win32
Removing build directory c:\users\lenovo\appdata\local\temp\pip-build-ups5vr\dlib\./tools/python/build
Configuring cmake ...
-- The C compiler identification is MSVC 18.0.21005.1
-- The CXX compiler identification is MSVC 18.0.21005.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Boost
-- Found PythonLibs: D:/pyanaconda/libs/python27.lib (found suitable version "2.7.12", minimum required is "2.6")
-- *****************************************************************************************************
-- We couldn't find the right version of boost python. If you installed boost and you are still getting this error then you might have installed a version of boost that was compiled with a different version of visual studio than the one you 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:\boost-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 compiled libraries.
-- Note that you will need to set the address-model based on if you want a 32 or 64bit python library.
--
-- Next, when you invoke cmake to compile dlib you may have to use cmake's -G option 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/lenovo/AppData/Local/Temp/pip-build-ups5vr/dlib/dlib/cmake_utils/add_python_module:116 (message):
Boost python library not found.
Call Stack (most recent call first):
CMakeLists.txt:6 (include)
-- Configuring incomplete, errors occurred!
See also "C:/Users/lenovo/AppData/Local/Temp/pip-build-ups5vr/dlib/tools/python/build/CMakeFiles/CMakeOutput.log".
error: cmake configuration failed!



重点是我的python64
platform32
所以我按照提示的方法 ,还是出这个问题!
boost也是64位,cmake也是64的
dlib是19.4版本
...全文
2539 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

6,847

社区成员

发帖
与我相关
我的任务
社区描述
Windows 2016/2012/2008/2003/2000/NT
社区管理员
  • Windows Server社区
  • qishine
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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