Pip install psycopg2 : Here we install Psycopg2 using the pip command,
As we need to install the psycopg2 on machine and use PostgreSQL from python.
The module is available on pypi.org.
We install use the pip command to install psycopg2 on any operating system.
The specific version is installed as,
Pip install psycopg2=2.7.5
If the problem occurs as pip install error like,
“connection error: [SSL: CERTIFICATE_VERIFY_FAILED]
The certificate verification is failed (_ssl.c:598)”.
We resolve the error by setting pypi.org and files.pythonhosted.org as trusted hosts.
Command line as,
Python –m pip install—trusted-host pypi.org—trusted-host files.pythonhosted.org—trusted-host pypi.python.
Steps for installation as,