classification
Title: virtualenv's activate does not update LD_LIBRARY_PATH
Type: enhancement Stage:
Components: Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ronaldoussoren, serge-sans-paille
Priority: normal Keywords:

Created on 2015-11-18 14:48 by serge-sans-paille, last changed 2015-11-23 10:39 by serge-sans-paille. This issue is now closed.

Messages (3)
msg254845 - (view) Author: (serge-sans-paille) * Date: 2015-11-18 14:48
My use cas of virtual env was the following:

1. create a virtual env
2. install a third party shared library and its python wrapper
3. import the wrapper that itself loads the shared library

The problem is that the shared library gets install into <my_env>/lib (which is a normal behavior) but virtualenv's activate does not update LD_LIBRARY_PATH

A possible fix would be to add the following lines into virtualenv's activate:

```
if [ -n "$_OLD_VIRTUAL_LD_LIBRARY_PATH" ] ; then
    PATH="$_OLD_VIRTUAL_LD_LIBRARY_PATH"
    export LD_LIBRARY_PATH
    unset _OLD_VIRTUAL_LD_LIBRARY_PATH
fi
```

and a bit later

```
_OLD_VIRTUAL_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
LD_LIBRARY_PATH="$VIRTUAL_ENV/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
```

in a simialr manner to what is done with `PATH`
msg255144 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2015-11-23 10:14
Hi,

This appears to be a description of an issue for <https://pypi.python.org/pypi/virtualenv>, not a component of CPython or its standard library.

The issue tracker for virtualenv is at <https://github.com/pypa/virtualenv/issues>.
msg255145 - (view) Author: (serge-sans-paille) * Date: 2015-11-23 10:39
ok, I'll report there then. Sorry for the noise :-/
History
Date User Action Args
2015-11-23 10:39:49serge-sans-paillesetstatus: open -> closed
resolution: not a bug
messages: + msg255145
2015-11-23 10:14:46ronaldoussorensetnosy: + ronaldoussoren
messages: + msg255144
2015-11-18 14:48:48serge-sans-paillecreate