LD_LIBRARY_PATH - how to set?

Roman Yakovenko roman.yakovenko at gmail.com
Thu Mar 31 04:33:25 EST 2005


On 31 Mar 2005 00:51:21 -0800, Serge Orlov <Serge.Orlov at gmail.com> wrote:
> 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.
> """

Thanks, well small script around my program will make the trick. I
think I have no other choise.

> Python does update enviromental variables if you change os.environ or
> call os.putenv, but the linker ignores the changes.
>   Serge.
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list