no module named error

Joe invalid.emal at at.address
Thu Dec 10 09:56:22 EST 2009


> No, the import-mechanism of python doesn't take LD_LIBRARY_PATH into
> account, and even if it did - _moda.la is a simple archive-file, not a
> shared library. It can't be dynamically loaded. Something in your
> build-process is not working.

So how should my stuff find these libs?

Here's what I've recently learned ...

So if I have the dir path of my c libs inside my exported
LD_LIBRARY_PATH (which includes the following files),  along w/ the dir
to the *.la file ...

_moda.a
_moda.la -> ../_moda.la
_moda.lai
_moda.so -> _moda.so.2.0.1
_moda.so.2 -> _moda.so.2.0.1
_moda.so.2.0.1
_moda.so.2.0.1T
_moda_la-moda_wrap.o

I get the 'ImportError: No module named _moda' error as in previous
post. But as I think your saying above, this should not work because
LD_LIBRARY_PATH doesn't get used.

I was at the python command line '>>>' and I did the following command.

import sys
sys.path.append('/home/me/my/c/libs/path/.libs')
# this is the path to the above listed files, and then when I did ...

   import moda

Everything worked just fine.

But I'm not quite sure how to fix it in my script or env.



More information about the Python-list mailing list