Installation
Requirements
- Python 3.13+
- WeasyPrint system libraries (only if you need PDF output — see below)
Install LeafPress
To use LeafPress as a CLI tool or desktop UI, install it globally with uv tool or pipx. To use it as a Python library in a project, use uv add or pip install.
Base
DOCX, HTML, ODT, EPUB output and document import — no system dependencies required.
With PDF Support
PDF output requires WeasyPrint and its system libraries (Pango, HarfBuzz — see below).
With Desktop UI
The menu bar / system tray app requires PyQt6:
Everything
All optional features (PDF + UI):
WeasyPrint System Dependencies
LeafPress uses WeasyPrint for PDF rendering. WeasyPrint requires Pango and related libraries. These are only needed if you install leafpress[pdf] or leafpress[all].
Ubuntu / Debian
Fedora / RHEL
macOS
Do not use brew install weasyprint
brew install weasyprint installs a standalone CLI tool — it does not install the system libraries that the Python WeasyPrint package requires. Install the libraries below instead.
Windows
On Windows, WeasyPrint can be installed via pip. GTK+ libraries may be needed — see the WeasyPrint Windows installation guide.