Making 'compiled' modules work with multiple python versions on Linux

Olivier B. perso.olivier.barthelemy at gmail.com
Thu Mar 28 11:07:04 EDT 2024


I have a python module that includes some C++ code that links with the
Python C API

I have now modified the c++ code so that it only uses the Limited API,
and linked with python3.lib instead of python311.lib.

I can now use that python module with different python versions on Windows

But on Linux, it seems that linking to libpython3.so instead of
libpython3.11.so.1.0 does not have the same effect, and results in
many unresolved python symbols at link time

Is this functionality only available on Windows?


More information about the Python-list mailing list