Installing Sweep requires:
Sweep is available from NonGNU ELPA, to install it simply type in Emacs M-x package-install RET sweeprolog RET.
Note that in Emacs prior to version 28, you need to explicitly enable NonGNU ELPA by adding something like the following to your Emacs configuration:
(with-eval-after-load 'package (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/")))
To upgrade Sweep to a newer version, do M-x package-upgrade RET sweeprolog RET.
For straight.el users, use the following form to install Sweep:
(straight-use-package '(sweeprolog :files (:defaults "*.pl")))