My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
FAQ  
Frequently Asked Questions about PySWIP
Featured, FAQ
Updated Jan 4, 2010 by yucete...@gmail.com

Introduction

This document contains questions and answers gathered mainly from PySWIP mailing list. You're welcome to add your questions to this wiki.

Common Usage

1. 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 Bugs

1. 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 required

A: 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.

Comment by jjconti@gmail.com, Mar 19, 2010

Can I turn off swi-prolog warnings?

Comment by infected...@gmail.com, Jun 25, 2011

"PySWIP doesn't work on 64 bit systems" do I need 32bit Python AND 32bit Prolog, then?


Sign in to add a comment
Powered by Google Project Hosting