Section H.1 Installing as a system package
For many operating systems, one may install the
liblouis Python bindings as a system package. For instance, on Debain/Ubuntu systems and Windows Subsystem for Linux, run# sudo apt install python3-louis
and on Mac
# brew install liblouis
To test the bindings, the following should complete successfully in a Python interpreter
>>> import louis
If you are following best practices by using a Python virtual environment for your PreTeXt project, you will need to give the environment access to system packages since
liblouis is now installed as a system package. You can do this when creating the virtual environment using# python3 -m venv /path/to/venv --system-site-packages
If you have an existing virtual environment configured for your PreTeXt project, you may alternatively edit one line in the file
pyvenv.cfg in the virtual environment’s main directory:include-system-site-packages = true
