LD_LIBRARY_PATH - how to set?

Serge Orlov Serge.Orlov at gmail.com
Thu Mar 31 03:51:21 EST 2005


Roman Yakovenko wrote:
> Hi. I have small problem. I need to load extension module that
depends
> on shared library. Before actually importing module I tried to edit
> os.environ or to call directly to os.putenv without any success -
> shared library was not found. I tried to search the Internet for the
> answer. The only approach I saw was to set LD_LIBRARY_PATH before
> invoking python script. I don't like this solution.

Looks like it's glibc linker inflexibility:
http://hathawaymix.org/Weblog/2004-12-30
"""
There is no provision for modifying the library search path once your
program has started.
"""

Python does update enviromental variables if you change os.environ or
call os.putenv, but the linker ignores the changes.

  Serge.




More information about the Python-list mailing list