I've had issues attempting to use an rtx-installed Python to install and run radian on Debian Bookworm. I've narrowed it down to the fact that radian manipulates LD_LIBRARY_PATH as part of its startup routine, specifically
This leads LD_LIBRARY_PATH to include /usr/lib/x86_64-linux-gnu (on my machine). If libpython3.11 is installed, then the call to os.execv leads to a different Python interpreter—the system's interpreter, which does not have radian installed—to be started. I've a minimal reproduction of the general issue below.
If I modify radian to not modify LD_LIBRARY_PATH, things seem fine.
The below is derived from https://github.com/pyenv/pyenv/issues/2875.
I've had issues attempting to use an rtx-installed Python to install and run radian on Debian Bookworm. I've narrowed it down to the fact that radian manipulates LD_LIBRARY_PATH as part of its startup routine, specifically
https://github.com/randy3k/radian/blob/89bc7a3690444e2bacb26eb1dcfbc76da4e2e343/radian/app.py#L112-L114
This leads LD_LIBRARY_PATH to include /usr/lib/x86_64-linux-gnu (on my machine). If libpython3.11 is installed, then the call to os.execv leads to a different Python interpreter—the system's interpreter, which does not have radian installed—to be started. I've a minimal reproduction of the general issue below.
If I modify radian to not modify LD_LIBRARY_PATH, things seem fine.
Do you have any ideas?
Take the two (scrappy) files below.
Then run
Inside of the container,
python
is Python 3.11.7 (installed by pyenv) andpython main.py
opens a second Python 3.11.7 interpreter, butleads Python 3.11.7 (installed by pyenv) to open a Python 3.11.2 interpreter. This is the system interpreter.
Note the following.
env PYTHON_CONFIGURE_OPTS="--enable-shared"
set.