2

I need to develop an expert system using prolog as an inference engine and python as interface. I already have the SWI-prolog installed in my machine, but, i can't import the interface PySwip because SWI-Prolog is not installed as a shared library. I've followed some tutorials in order to get SWI-prolog correctly installed but, it failed.

Could somebody help?

edwinksl
  • 23,789
aguiarroney
  • 143
  • 1
  • 6

1 Answers1

2
sudo apt-get update && sudo apt-get install swi-prolog swi-prolog-nox

Provides

.
/usr/lib/libswipl.a
/usr/lib/libswipl.so
/usr/lib/libswipl.so.7.2
/usr/lib/libswipl.so.7.2.3
/usr/lib/pkgconfig/swipl.pc
.

You can read the complete file list here http://packages.ubuntu.com/xenial/amd64/swi-prolog-nox/filelist

Knud Larsen
  • 3,084
  • it still keeps saying that the SWI-Prolog is not installed as a shared library... – aguiarroney Jul 16 '16 at 18:52
  • if ir helps, in the webpage of pyswip is listed the riquirements for running the interface. it's the following: Python 2.3 and higher. ctypes 1.0 and higher. SWI-Prolog 5.6.x and higher (not the development branch). libpl as a shared library. – aguiarroney Jul 16 '16 at 18:53
  • after the installation as you said before, there're no files such as the ones you listed above – aguiarroney Jul 16 '16 at 19:04
  • @Roney I think the issue is actually that the library basename has been changed (from libpl to libswipl) - see libpl.so in Prolog version 6.6.4? for example. As a 'hail mary' you could try symlinking the new libs to the old name e.g. sudo ln -s libswipl.so /usr/lib/libpl.so – steeldriver Jul 17 '16 at 21:54