|Did you know ...||Search Documentation:|
|Janus platforms notes|
Janus relies on the C APIs of Prolog and Python and functions therefore independent from the platform. While the C, Python and Prolog code the builds Janus is platform independent, dynamically loading Prolog into Python or Python into Prolog depends on versions as well as several properties of the dynamic linking performed by the platform. In the sections below we describe some of the issues.
We tested the Windows platform using SWI-Prolog binaries from
and Python downloaded from
The SWI-Prolog binary provides
janus.dll which is linked to
python3.dll, a “stable API'' based wrapper that each
Python 3 binary distribution provides in addition to
Calling Python from Prolog is supported out of the box, provided the
python3.dll is in the search
The Python package can be installed using pip as described in
section 7. Once built, this package
finds SWI-Prolog on
%PATH% or using the registry and should
be fairly independent from the Prolog version as long as it is version
9.1.12 or later.
On Linux systems we bind to the currently installed Prolog and Python version. This should work smoothly from source. Janus is included in the PPA distribution for Ubuntu as well as in the Docker images. It is currently not part of the SNAP distribution.
See section 7 for for building the
Unfortunately MacOS versions of Python do not ship with the
python3.dll found on Windows. This implies we
can only compile our binaries against a specific version of Python. We
will use the default Python binary for that, which is installed in
The Macports version is also linked against an explicit version of Python, in this case provided by Macports.
The Python package
janus_swi may be compiled against any
version of Python selected by pip. See section
7 for details.