python - 找不到 boost 或 python

标签 python c++ boost cmake

我已经尝试了大多数建议,但仍然在某处失败。有人可以一步一步地引导我吗?我正在使用 cmake 3.2.2 和 vs2013。我也有 boost_1_57_0。

这是camke一直发给我的错误信息

CMake Error at C:/Program Files/CMake/share/cmake-3.2/Modules/FindBoost.cmake:1182 (message):
Unable to find the requested Boost libraries.

Unable to find the Boost header files.  Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
  C:/dlib-18.15/dlib/add_python_module:37 (FIND_PACKAGE)
  CMakeLists.txt:5 (include)


CMake Error at C:/Program Files/CMake/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
(Required is at least version "2.6")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.2/Modules/FindPythonLibs.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  C:/dlib-18.15/dlib/add_python_module:38 (FIND_PACKAGE)
  CMakeLists.txt:5 (include)

我可以在 CMakeLists.txt 文件 中输入什么吗?如果是这样,我可以按照应输入的确切方式获得它吗?

最佳答案

看看这些帖子,看看它们是否对您有帮助。可以通过在顶层 CMakeLists.txt 中设置路径来解决很多此类问题。

它应该看起来像这样:

set(BOOST_ROOT "C:\boost")

以下是对同一问题的一些其他引用:

cmake doesn't find boost libraries

How can I get cmake to find my alternative boost installation?

关于python - 找不到 boost 或 python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30192575/

相关文章:

python - 虹膜数据在哪一部分接收到标记簇?

c++ - 如果 T 不可 move ,则 std::vector<T> 是否可 move ?

c++ - 使用 Boost 库生成非常大的随机数

c++ - 使用 openCV 裁剪图像

c++ - boost 测试 fpic 链接错误

c++ - Rcpp 中的复杂 Gamma 函数

python - 从其他装饰器访问参数化参数

python - 为什么 `datetime` 模块对时区的行为如此?

python - 升级 Ubuntu : python3 install is corrupted

c++ - 线性同余发生器的分析是错误的?