Error installing PowerDNS-Admin when running: pip install -r requirements.txt

It appears you are missing some prerequisite to build the package from source.

You may install a binary package by installing ‘psycopg2-binary’ from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.

For further information please check the ‘doc/src/install.rst’ file (also at
<https://www.psycopg.org/docs/install.html>).

error: command ‘/usr/bin/x86_64-linux-gnu-gcc’ failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psycopg2
Failed to build psycopg2
ERROR: Could not build wheels for psycopg2, which is required to install pyproject.toml-based projects

 

To solve the problem you have to open another terminal window and run the following command:

sudo apt-get install libpq-dev python3-dev

then run again:

pip install -r requirements.txt

Leave a Reply

Your email address will not be published. Required fields are marked *