Installation of the dep2pict program

Dep2pict is implemented with the Ocaml language. It is easy to install on Linux or Mac OS X (installation on Windows should be possible, but this is untested).

If dep2pict is already installed, please consult the upgrade page.

⚠️ If you run into trouble using instructions of this page, feel free to send a mail to the maintainer.

1) Install prerequisite

On Ubuntu or Debian

apt update && apt install libcairo2-dev wget m4 unzip librsvg2-bin curl

On Mac OS X

2) Install opam

The version 2.0.0 should be installed (note that opam can be installed with apt or brew but not only in version 1). We give short instructions, please refer to opam installation page for more details. Installation can be done with on of the two methods below.

sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
sudo cp <downloaded file> /usr/local/bin/opam
sudo chmod a+x /usr/local/bin/opam

3) Setup opam

Check with the command opam --version that the version 2 is available. Run opam init and follow instructions. Note that it takes some time to build the ocaml compiler.

Check that ocaml is installed with ocamlc -v

4) Install dep2pict program

opam remote add grew http://opam.grew.fr
opam install --yes dep2pict

Installation of the PyQt GUI

A PyQt GUI is available (the dep2pict program must be installed separately). The installation command for the GUI is:

pip install dep2pict-qt

Depending on your Python installation, you may have to replace pip by pip3.

You can check that it is well installed with the unix command dep2pict_qt.