Optional dependencies

Usage

Production setup

The pip install URLs in the production setup guide include [all] at the end by default, which means all optional dependencies will be installed by default.

If you only want specific optional dependencies, replace the all with a comma-separated list of the pip extra names (e.g. sqlite,speedups).

If you don't want any optional dependencies, just remove the [all].

Development setup

To install all optional dependencies, use pip install --upgrade -r optional-requirements.txt.

To install specific optional dependencies, install the packages listed "Required packages" from the table of optional dependencies below. You can also check the expected versions of the packages from optional-requirements.txt.

Docker

The docker images contain all optional dependencies. Currently they can't be easily disabled.

List of optional dependencies

The symbol means you must also enable the feature in the config. Required packages in parentheses indicate a large dependency of the other packages.

All Python bridges

pip extra nameRequired packagesDescription
metricsprometheus_clientPrometheus metrics.
e2bepython-olm
pycryptodome
unpaddedbase64
End-to-bridge encryption support (see native dependency below).
sqliteaiosqliteExperimental SQLite support (currently in Telegram/Facebook/Signal)

N.B. python-olm requires libolm3 with dev headers, Python dev headers, and a C compiler. This means libolm-dev, python3-dev and build-essential on Debian-based distros.

If you want to avoid the dev headers, you can install the libolm3 package without -dev and get a pre-compiled python-olm from gitlab.matrix.org's PyPI registry. However, this method has not been tested properly, so it might not work at all.

pip install python-olm --extra-index-url https://gitlab.matrix.org/api/v4/projects/27/packages/pypi/simple

mautrix-telegram

pip extra nameRequired packagesDescription
speedupscryptg
cchardet
aiodns
brotli
Speed up some things, e.g. by using native crypto code.
qr_loginqrcode
Pillow
Telegram login by scanning a QR code from another device.
formattednumbersphonenumbersFormat phone numbers nicely in contact share messages