Embedding works with PyPy, but same code fails with CPython
Embedding with cffi works fine with PyPy, but with CPython it gives this error:
Failed to initialize the Python-CFFI embedding logic:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 674, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1176, in create_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
ImportError: /usr/lib/python3.10/site-packages/_cffi_backend.cpython-310-x86_64-linux-gnu.so: undefined symbol: PyUnicode_FromFormat
From: _mytest
compiled with cffi version: 1.15.0
_cffi_backend module: not loaded
sys.path: ['/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/home/archie/.local/lib/python3.10/site-packages', '/usr/lib/python3.10/site-packages', '/usr/lib/python3.10/site-packages/tohil-4.4.2-py3.10-linux-x86_64.egg', '/usr/lib/python3.10/site-packages/linkgrammar']
What could I be doing wrong? Here's a minimal-ish reproduction of what I'm doing: https://github.com/wusspuss/error_reproduction