SWI-Prolog: [FATAL ERROR: Could not find system resources]

132 Views Asked by At

I'm trying to execute my Python script in which I use Prolog. The code is the following:

from pyswip import Prolog
prolog = Prolog()
prolog.consult("KB.pl")
print(list(prolog.query("faster(cat, dog)")))

I kept having the following error: SWI-Prolog: [FATAL ERROR: Could not find system resources].

I already tried to fix the issue following the instructions provided by SWI Prolog documentation.

  • libswipl.dll is in the installation tree;
  • bin directory of the installation tree is added to %PATH%.

I also tried to set the environment variable SWI_HOME_DIR from the Windows cmd using the following command line:

setx SWI_HOME_DIR "C:\Program Files\swipl"
0

There are 0 best solutions below