找不到请求的增强库

2024-10-01 17:35:09 发布

您现在位置:Python中文网/ 问答频道 /正文

在平台:macOS High塞拉

你好, 我试图使用从源代码构建的方法来安装RDkit,当我输入cmake ..时出现了问题,终端显示

CMake Warning at /usr/local/Cellar/cmake/3.12.0/share/cmake/Modules/FindBoost.cmake:1723 (message): No header defined for python-py36; skipping header check Call Stack (most recent call first): CMakeLists.txt:202 (find_package)

CMake Error at /usr/local/Cellar/cmake/3.12.0/share/cmake/Modules/FindBoost.cmake:2044 (message): Unable to find the requested Boost libraries.

Boost version: 1.67.0

Boost include path: /usr/local/include

Could not find the following Boost libraries:

boost_python

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.

但是我已经将/usr/local/Cellar/boost/lib和/usr/local/Cellar/boost python/lib添加到~/.bash_配置文件中。 我的~/.bash_配置文件是这样写的:

export RDBASE=/Users/wangzhicheng/Software/RDkit/rdkit-Release_2018_03_3

export PYTHONPATH=$RDBASE

export 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。在

那么问题在哪里呢?在


Tags: thetopathcmakelibrarieslibusrlocal
1条回答
网友
1楼 · 发布于 2024-10-01 17:35:09

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

出现问题的原因是cmake希望在库文件夹中找到libboost_python3.dylib,但实际上这个文件名为libboost_python3x.dylib(x取决于您的python版本),因此您只需在终端中键入以下命令:

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

你可以解决这个错误!在

相关问题 更多 >

    热门问题