[英]python `ImportError: libboost_python27.so.1.67.0: cannot open shared object file: No such file or directory `
I'm running into a problem using a boost-compiled c++ code for python2.我在为 python2 使用 boost 编译的 c++ 代码时遇到了问题。 I've gotten this to install correctly using the boost package for anaconda2-2019 on WSL, but importing the python package yields the error:
我已经在 WSL 上使用 anaconda2-2019 的 boost 包正确安装它,但是导入 python 包会产生错误:
ImportError: libboost_python27.so.1.67.0: cannot open shared object file: No such file or directory
I found where the libboost_python27.so.1.67.0
lives in ~/anaconda2/lib/
so I'm not sure why I'm getting this error returned.我发现
libboost_python27.so.1.67.0
位于~/anaconda2/lib/
中,所以我不确定为什么会返回此错误。
This is an old post but you could try the following solutions taken from similar problem at Error loading shared libraries of boost这是一篇旧帖子,但您可以尝试以下解决方案,该解决方案取自错误加载 boost 的共享库时的类似问题
-Wl,-rpath,/path/to/boost/libraries -lboost_python
export LD_LIBRARY_PATH=/path/to/boost/libs:$LD_LIBRARY_PATH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.