[C++-sig] help running boost-python tutorials

Doug Blanding blanding at localnet.com
Wed Nov 3 01:15:41 CET 2004


I have downloaded boost_1_31_0 and have successfully gone through all of the 
steps of the installation, but when I try to run the tutorial examples, I get 
the following error when I try to import the extension module into python:

ImportError: libboost_python.so.1.31.0: cannot open shared object file: No 
such file or directory

I have Python2.2 on RH9 linux.
I installed bjam as an rpm.
I set the following environment variables:
        export PYTHON_ROOT=/usr
        export PYTHON_VERSION=2.2
Then I compiled boost using:
        bjam -sTOOLS=gcc stage
Next, I cd to file:  /dnld/boost_1_31_0/libs/python/example
and ran the command:
[doug at maven example]$ bjam -sTOOLS=gcc test
...patience...
...found 2025 targets...
...updating 40 targets...
MkDir1 bin/boost
... etc. ...
execute-test bin/example/test1.test/gcc/debug/test1.run
**passed** bin/example/test1.test/gcc/debug/test1.test
gcc-C++-action 
bin/example/getting_started2.so/gcc/debug/shared-linkable-true/getting_started2.o
gcc-Link-action 
bin/example/getting_started2.so/gcc/debug/shared-linkable-true/getting_started2.so
Chmod1 
bin/example/getting_started2.so/gcc/debug/shared-linkable-true/getting_started2.so
execute-test bin/example/test2.test/gcc/debug/test2.run
**passed** bin/example/test2.test/gcc/debug/test2.test
...updated 40 targets...

I then get the import error when I try to import getting_started1 or 
getting_started2.

ImportError: libboost_python.so.1.31.0: cannot open shared object file: No 
such file or directory

I have tried copying the files libboost_python.so.1.31.0 and 
libboost_python.so into various places so they can be found by python, but 
without success.

Can you tell me what I'm doing wrong?
Doug Blanding



More information about the Cplusplus-sig mailing list