Hello,
this afternoon I updated some old ports and I got SWI-Prolog’s latest release (9.1.21) and I also got Python’s most recent version (3.12.1). I reinstalled some packages/modules to run with the new Python version/interpreter. I reinstalled and updated the janus-swi package as well, but when I try to import it, I get this “Fatal Error” message (while all works fine with Python3.11.7):
Python 3.12.1 (main, Dec 17 2023, 13:42:47) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import janus_swi as janus
Fatal Python error: PyImport_AppendInittab: PyImport_AppendInittab() may not be called after Py_Initialize()
Python runtime state: initialized
Current thread 0x00000001dd54d000 (most recent call first):
File "/Users/marcobachini/Library/Python/3.12/lib/python/site-packages/janus_swi/__init__.py", line 18 in <module>
File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 994 in exec_module
File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
File "<stdin>", line 1 in <module>
Extension modules: janus_swi._swipl (total: 1)
zsh: abort python
It seems to be a Python error, so maybe one should ask in another forum?. Does anyone have a clue if and how I can work around this issue?
Thanks