According to the official documentation the local installation
pip install "psycopg[c]"
is the best way to install psycopg3 for a production website