[C++-sig] ImportError...'No such file' etc. when importing hello_ext from tutorial

kekela at gmx.net kekela at gmx.net
Fri Dec 5 11:48:02 CET 2008


Hi,

I'm new to boost and aiming to use boost:python and I am experiencing difficulties with the boost:python tutorial. While running bjam plain (i.e. with test targets and without --preserve-test-target or -n -a) creates nice test results (i.e. hello, hello.output and hello.test are created with "hello, world\n\nEXIT STATUS: 0" as well as "passed"), I cannot import hello_ext in python, when bjamming without test targets etc.

But then again, maybe I shouldn't try to import hello_ext.so but have some kind of hello_ext.pyd?

Well, what happens is this:

[XXXX release]$ ls
hello_ext.so  hello.o
[XXXX release]$ python
Python 2.4.3 (#1, May 24 2008, 13:57:05) 
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hello_ext
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: libboost_python-gcc41-1_37.so.1.37.0: cannot open shared object file: No such file or directory


Actually I wasn't able to locate any libboost* files yet, but since the tests are passed, I'm probably doing something wrong. Please guide me!

Thank you very much.


More information about the Cplusplus-sig mailing list