Newer versions of Python (v3.9) do not include the python library in their python-config --ldflags unless you also pass --embed.