Skip to content

Specify the python interpreter at runtime #3079

Closed Answered by adamreichold
vsiles asked this question in Questions
Discussion options

You must be logged in to vote

I am not sure if this is helpful, but the interpreter specified at build time via PYO3_PYTHON is used only to determine the Python configuration, e.g. linker flags, and its path is not used at runtime. Based on this, we should dynamically link libpython3.8.so if you specified a CPython 3.8 binary at build time. Linking against an absolute path like /usr/lib/libpython3.8.so to ensure that nothing else on the dynamic loader's search paths is picked up, would require that we selectively overwrite the linker flags determined by invoked the Python interpreter which does not seem very practical.

I think the easier way to achieve what you want would be to set LD_LIBRARY_PATH at runtime to point …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vsiles
Comment options

Answer selected by vsiles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants