install psycopg2 ubuntu

C++
sudo apt-get update -y

sudo apt-get install -y python3-psycopg2$ pip install pgcli

or

$ easy_install pgcli

Source

Also in C++: