As with all good recipes, we begin with the primary ingredients. Several projects written with Python are often distributed via PyPI and the associated pip installation tool. If we invoke pip3 (for Python version 3) with the install parameter, we should be able to obtain any software available in the package index. We're particularly interested in the patroni and patronictl utilities, as well as the associated requirements.
This is why we recommended downloading the Patroni source. Patroni is somewhat terse with its exception handling, and rather than explain a missing dependency, it simply fails and emits a jumbled heap of debug output. To avoid this, we simply install all the basic requirements as defined by the source, ...