Installation¶
Warning
This library uses a beaconing mechanism based on the Google Analytics Measurement Protocol
that has the only purpose of tracking what versions are used and in what
environment. To completely disable the reporting just set the
LIBLET_NOBEACON
in your environment before importing the library.
We recommend using the latest version of Python 3, LibLET supports Python 3.7 and newer. These packages will be installed automatically when installing LibLET:
antlr4-python3-runtime the runtime of ANTLR 4 for Python 3;
jupyter a web application to create documents that contain live code, math, visualizations and narrative text;
graphviz the Python binding for the Graphviz graph visualization software.
Virtual environments¶
It’s suggested to use a virtual environment to manage Python dependencies: virtual environments are independent groups of Python libraries, one for each project; packages installed for one project will not affect other projects or the operating system’s packages.
Create an environment¶
Python 3 comes bundled with the venv
module to create virtual
environments. Create a project folder and a venv
folder within:
$ mkdir myproject
$ cd myproject
$ python3 -m venv venv
On Windows:
$ py -3 -m venv venv
Activate the environment¶
Every time you decide to use the library, activate the environment:
$ . venv/bin/activate
On Windows:
> venv\Scripts\activate
Install the library¶
Within the activated environment, use the following command to install the library:
$ pip install liblet
Install the external dependencies¶
To use LibLET you also need to manually install:
the Graphviz visualization software, and
the ANTLR Tool, that is antlr-4.7.2-complete.jar.
Follow the installation instruction on the Graphviz site according to your operating system and package manager.
To install the ANTLR Tool, you can use the install_antlrjar command provided by LibLET as:
$ install_antlrjar
and set the ANTLR4_JAR
environment variable to the full path of the
downloaded jar as advised.