IntroductionThis document contains questions and answers gathered mainly from PySWIP mailing list. You're welcome to add your questions to this wiki. Common Usage1. Q: Can I limit the number of generated solutions? A: Yes, see HowToLimitNumberOfFoundSolutions. 2. Q: Can I limit the running time of a query? A: Yes, see HowToLimitQueryRunningTime. 3. Q: How can I run multiple queries with distinct data? A: See HowToSimulateMultipleKnowledgebases. Errors and Bugs1. Q: When I import PySWIP, I get: libpl (shared) not found. Possible reasons: 1) SWI-Prolog not installed as a shared library. Install SWI-Prolog (5.6.34 works just fine) A: If you're on UNIX/Linux, you didn't install SWI-Prolog's shared library (which is NOT the default when you compile the sources yourself, and not installed by default for many distributions such as Debian/Ubuntu. Most probably you'll have to compile SWI-Prolog on your own; see INSTALL. A: If you're on Windows, you need to set your path so that libpl.dll is found; see INSTALL. 2. Q: I get the following when try to run a trivial PySWIP example: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyswip/prolog.py", line 81, in __call__
v.update(r)
ValueError: dictionary update sequence element #0 has length 1; 2 is requiredA: Upgrade your PySWIP to at least version 0.2.2. 3. Q: I can't even run the sample programs, since PySWIP segfaults! A: PySWIP doesn't work on 64 bit systems, even if you install it on a 32 bit virtual machine running on a 64 bit host. |
Can I turn off swi-prolog warnings?
"PySWIP doesn't work on 64 bit systems" do I need 32bit Python AND 32bit Prolog, then?