I have just installed pyswip and I was testing if it is working correctly but I always get this error: Assertion failed: 0, file /home/swipl/src/swipl-devel/src/pl-fli.c, line 2637
I was using this example code:
from pyswip import Prolog
prolog = Prolog()
prolog.assertz("father(michael,john)")
I am using windows 10 python 3.11.1 and I have swipl in the path. I tested in WSL ubuntu and get the same error.
Knowing why this error happen and solve it.
I faced a similar issue when getting a neurosymbolic model called DeepProbLog to run on my Windows. It'd be helpful to know which version of swipl and pyswip you have.
I personally use
swipl version 8.4.2 for Windows 64 bits (https://www.swi-prolog.org/download/stable?show=all) \
fork the pyswip provided by the repo in DeepProbLog pip install git+https://github.com/ML-KULeuven/pyswip
If you want to use WSL Ubuntu, you can keep reading DeepProbLog's github page as they also provide commands on working with Prolog in Linux.