Home » ImportError: No module named psycopg2

ImportError: No module named psycopg2

To solve ImportError: No module named psycopg2 error follow below methods.

ERROR LOG

ImportError: No module named psycopg2

How to solve ImportError: No module named psycopg2 ?

Initially, Install the dependencies with,

sudo apt-get install build-dep python-psycopg2

then run the below command

pip install psycopg2-binary 

Hope the above solution works.

Also read :

socket.error: [Errno 111] Connection refused Python
ImportError: No module named ‘ConfigParser’ Python