This library requires Python 3.6 or higher.


Whichever OS you are running, you will need to install at least TensorFlow or PyTorch. You can refer to their corresponding installation pages to do so:

If you are running another OS than Linux, you will need a few extra dependencies.

For MacOS users, you can install them using Homebrew as follows:

brew install cairo pango gdk-pixbuf libffi

For Windows users, those dependencies are included in GTK. You can find the latest installer over here.

Via Python Package#

Install the last stable release of the package using pip:

pip install python-doctr

We strive towards reducing framework-specific dependencies to a minimum, but some necessary features are developed by third-parties for specific frameworks. To avoid missing some dependencies for a specific framework, you can install specific builds as follows:

pip install python-doctr[tensorflow]

Via Git#

Install the library in developper mode:

git clone
pip install -e doctr/.[tf]