【问题标题】:Unable to find the requested Boost libraries找不到请求的 Boost 库
【发布时间】:2018-08-07 08:33:12
【问题描述】:

平台:macOS High Sierra

你好, 我尝试使用Building from source的方法安装RDkit,输入cmake ..时出现问题,终端显示

CMake 警告位于 /usr/local/Cellar/cmake/3.12.0/share/cmake/Modules/FindBoost.cmake:1723(消息): 没有为 python-py36 定义标头;跳过标题检查 调用堆栈(最近的调用优先): CMakeLists.txt:202 (find_package)

/usr/local/Cellar/cmake/3.12.0/share/cmake/Modules/FindBoost.cmake:2044 处的 CMake 错误(消息): 找不到请求的 Boost 库。

Boost 版本:1.67.0

Boost 包含路径:/usr/local/include

找不到以下 Boost 库:

boost_python

未找到任何 Boost 库。您可能需要将 BOOST_LIBRARYDIR 设置为 包含 Boost 库或 BOOST_ROOT 的目录到 提升。

但我已将 /usr/local/Cellar/boost/lib 和 /usr/local/Cellar/boost-python/lib 添加到 ~/.bash_profile。 我的 ~/.bash_profile 是这样写的:

导出RDBASE=/Users/wangzhicheng/Software/RDkit/rdkit-Release_2018_03_3

导出 PYTHONPATH=$RDBASE

导出 DYLD_LIBRARY_PATH=$RDBASE/lib:/usr/local/Cellar/boost/1.67.0_1/lib:/usr/local/Cellar/boost-python/1.67.0/lib:/usr/local/lib: /usr/local/Cellar/boost-python3/1.67.0_1/lib

export PATH="/Users/wangzhicheng/anaconda3/bin:$PATH"

顺便说一句,我已经安装了自制的boost,boost-python3。

那么问题出在哪里?

【问题讨论】:

    标签: python c++ boost cmake


    【解决方案1】:

    我想我已经找到了解决这个问题的方法。

    问题的原因cmake想在你的库文件夹中找到libboost_python3.dylib,但实际上这个文件叫做libboost_python3x.dylib(x取决于你的python版本),所以你只需要在你的终端输入以下命令:

    cd /usr/local/lib
    sudo ln -s libboost_python3x.dylib libboost_python3.dylib
    

    你可以解决这个错误!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-21
      • 2019-02-06
      • 2018-08-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多