pythonprolog

Assertion failed when using pyswip


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.


Solution

  • 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

    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.