Are there any benefits of a shared build python, compared to a static build python?

Tianhe ptq008 at gmail.com
Tue Jul 19 11:38:26 EDT 2022


Python by default builds the library `libpythonMAJOR.MINOR.a` and
statically links it into the interpreter. Also it has an `--enable-shared`,
(https://docs.python.org/3/using/configure.html#cmdoption-enable-shared)
flag, which will build a shared library `libpythonMAJOR.MINOR.so.1.0`, and
dynamically link it to the interpreter.

Are there any benefits of a shared build python, compared to a static build
python? Is there any performance difference?

I found a related question on SO and is it like he said (
https://stackoverflow.com/a/73035776/5983841), shared built vs statically
built python only affects the "Embedding Python in Another Application"
scenario ?

--

Regards,

Micky


More information about the Python-list mailing list