Swi-Prolog的安装

转载自:https://mp.weixin.qq.com/s/cVhuibaXiCuUBTc-dX1Weg

macOS的安装

Port安装
开启浏览器输入链接 https://www.macports.org/install.php 下载当前使用的版本如下所示:
在这里插入图片描述
运行MacPorts-xxxxxxx.pkg安装包成功后
在这里插入图片描述

安装稳定版
$ sudo port install swi-prolog
Password:
Portfile changed since last build; discarding previous state.
—> Computing dependencies for swi-prolog
The following dependencies will be installed:



—> Some of the ports you installed have notes:
gawk has the following notes:
readline support has been removed from gawk. If you need to run gawk
interactively, install rlwrap:

sudo port install rlwrap

and run gawk using rlwrap:

rlwrap gawk ...

libpsl has the following notes:
libpsl API documentation is provided by the port ‘libpsl-docs’.
$

安装完成

$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.2)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?-

安装开发板

$ sudo port install swi-prolog-devel
安装过程略 …
安装完成
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.1.15)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?-

Homebrew的安装
安装最新稳定版
$ brew install swi-prolog
Updating Homebrew…
==> Installing dependencies for swi-prolog: openssl@1.1, berkeley-db, jpeg, xz, libarchive, libyaml, pcre, readline, libtool and unixodbc
==> Installing swi-prolog dependency: openssl@1.1



==> libtool
In order to prevent conflicts with Apple’s own libtool we have prepended a “g”
so,you have instead:glibtool and glibtoolize.
安装完成
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.3)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?-

安装最新版
$ brew install swi-prolog --HEAD
Updating Homebrew…
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae



==> brew cleanup has not been run in 30 days, running now…
Removing: /usr/local/Cellar/cmake/3.15.3… (5,800 files, 53.2MB)
Pruned 0 symbolic links and 4 directories from /usr/local
==> Caveats
==> cmake
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/cmake
$
安装完成
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.1.15)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?-

Ubuntu 16.04 的安装
$ sudo apt-get install software-properties-common

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
libllvm4.0 linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic



Setting up swi-prolog-x (8.0.3-0-xenialppa2) …
Setting up swi-prolog (8.0.3-0-xenialppa2) …
Processing triggers for libc-bin (2.23-0ubuntu10) …
安装完成
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.3)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?-

Windwos的安装

开启浏览器输入链接https://www.swi-prolog.org/Download.html下载当前使用的版本如下所示:
在这里插入图片描述
这里选择Stable release
在这里插入图片描述
选择 SWI-Prolog 8.0.3-1 for Microsoft Windows (64 bit)
双击swipl-8.0.3-1.x64安装包
在这里插入图片描述
点击 “下一步”
在这里插入图片描述
点击“我接受”
在这里插入图片描述
按图选择然后点击“下一步”
在这里插入图片描述
点击“下一步”
在这里插入图片描述
点击“安装”
在这里插入图片描述
在这里插入图片描述
点击“完成”
然后运行 “CMD"
在这里插入图片描述
点击“确定”
在这里插入图片描述
键入swipl输入回车键
在这里插入图片描述
安装成功!
来自微信公众号:人工智能Prolog
在这里插入图片描述

  • 1
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值