Installing SWI-Prolog (with JPL) on Mac OS X

Now that's easy. You have two options:

  • install using MacPorts, or
  • use the binary installer (which, in turn, is based on MacPorts).

Both options will give exactly the same results.

Install SWI-Prolog using MacPorts

  • Download and install MacPorts, as described here.
  • In the terminal, type:
sudo port install swi-prolog
  • You're done!

Install using the binary installer

  • Go to the SWI-Prolog download page and download the appropriate installer for your architecture (Intel, PPC) and Mac OS X version (Tiger, Leopard).
  • Extract the mpkg file and follow the installer instructions.

After installing...

Both methods install SWI-Prolog in /opt/local/:

  • the binary is in /opt/local/bin/swipl (add /opt/local/bin to your PATH if you - or the MacPorts installer - haven't already done so)
  • all the rest is to be found in /opt/local/lib/swipl-<version>

To test if it works:

  • go to /opt/local/lib/swipl-<version>/doc/packages/examples/jpl/java/Test
  • just to make sure: rm Test.class
  • ./ - this should compile (in the absence of Test.class) and run it.
  • If all goes well, you should get:
bash-3.2# ./
Compiling Test

JPL demo: Test

test 0...% compiled 0.00 sec, 4,064 bytes
test 1...passed.
test 2...passed.
test 3...passed.
test 4...passed.
test 5...passed.
test 6...passed.
test 7...passed.
test 8...passed.
test 9...passed.
test 10...passed.
test 11...passed.
test 101...00004567182904567231901235678312041678321528904567312936890412738905683412794156842736189057340412506823420839420831756240819623751407856239104837562910482956804237195684739158764391584763596579576799passed.
pl/prolog/jpl/macosx.txt · ostatnio zmienione: 2017/07/17 08:08 (edycja zewnętrzna) Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0