2016-07-18 92 views
0

不知何故,当安装python3.5与boost,cmake无法找到它。 我试图安装lib,当我这样做时,我得到这个错误。我有提升 - python安装。cmake boost问题和实习生无法安装dlib

CMake Warning at 
/usr/local/Cellar/cmake/3.6.0_1/share/cmake/Modules/FindBoost.cmake:1459 (message): 
    No header defined for python-py34; skipping header check 
Call Stack (most recent call first): 
    /Users/pascaljardin/Desktop/dlib-19.0/dlib/add_python_module:60 (FIND_PACKAGE) 
    CMakeLists.txt:6 (include) 
-- Could NOT find Boost 
-- Could NOT find Boost 
-- Found PythonLibs: /usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5.dylib (found suitable version "3.5.2", minimum required is "3.4") 

-- ***************************************************************************************************** 
-- To compile Boost.Python yourself download boost from boost.org and then go into the boost root folder 
-- and run these commands: 
--  ./bootstrap.sh --with-libraries=python 
--  ./b2 
--  sudo ./b2 install 
-- ***************************************************************************************************** 
CMake Error at /Users/pascaljardin/Desktop/dlib-19.0/dlib/add_python_module:108 (message): 
    Boost python library not found. 
Call Stack (most recent call first): 
    CMakeLists.txt:6 (include) 
-- Configuring incomplete, errors occurred! 
See also "/Users/pascaljardin/Desktop/dlib-19.0/tools/python/build/CMakeFiles/CMakeOutput.log". 
error: cmake configuration failed! 

从头开始。这是我安装在我的MacBook Air OS一切X EL队长版本10.11.5

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 
$ brew update 
$ brew install python3 
$ brew install boost --with-python3 
$ brew install cmake 

那么,有什么我不这样做的权利,当我安装的一切吗?我真的不知道为什么发生这种情况,我真的想安装DLIB lib文件夹中使用

python3 setup.py install 

还是有更简单的方法与python3安装dlib?

+0

你的系统中有什么是boost python库名? – zaufi

+0

另请参阅:https://gitlab.kitware.com/cmake/cmake/merge_requests/35 – zaufi

+0

我正在使用boost 1.60,这是兼容搅拌机2.77 –

回答

1

你忽略了安装boost :: python。

brew install boost-python --with-python3 

前段时间,Homebrew把它们分成两个包。

+0

谢谢!解决了升压问题,但现在我得到了一个不同的错误... –

+0

当我安装python3 setup.py安装 [100%]链接CXX共享库dlib.so 架构x86_64的未定义符号: “boost: :python :: detail :: init_module(PyModuleDef&,void()())“,引用来自: dlib.cpp.o中的_PyInit_dlib 架构x86_64找不到ld:symbol(s) clang:error:linker command failed退出代码1(使用-v查看调用) make [2]:** [dlib.so]错误1 make [1]:*** [CMakeFiles/dlib_.dir/all]错误2 make: *** [全部]错误2 错误:cmake生成失败! –

+0

这可能来自尝试在您的项目中使用2个不同的python安装。如果你已经安装了另一个python(例如通过Homebrew),你需要确保你的项目和boost :: python使用相同的python。 – nega