Dou*_*ghy 2 c++ python boost-python
我下载了最新版本的Boost,我试图在Ubuntu 10.04上启动并运行Boost.python教程:http://www.boost.org/doc/libs/1_43_0/libs/python/doc/tutorial/ DOC/HTML /蟒蛇/ hello.html的
我导航到正确的目录,运行"bjam"并使用默认设置进行编译.我还没有创建一个bjam配置文件.编译似乎有效,但现在我不知道如何在我的python脚本中包含这些文件.当我尝试运行python hello world脚本时,它给了我这个错误:
Traceback (most recent call last):
File "./hello.py", line 6, in <module>
import hello_ext
ImportError: libboost_python.so.1.43.0: cannot open shared object file: No such file or directory
Run Code Online (Sandbox Code Playgroud)
有谁知道发生了什么?
你是如何安装boost的?假设您使用以下内容:http://www.boost.org/doc/libs/1_43_0/more/getting_started/unix-variants.html#easy-build-and-install
liboost_python shard库将安装在/ usr/local/lib中
要运行hello.py示例,请尝试以下操作:
LD_LIBRARY_PATH=/usr/local/lib python ./hello.py
Run Code Online (Sandbox Code Playgroud)