Fix error with psycopg2 when setting up django with postgres
Recently, I wanted to start a Django project, and this time I decided to use PostgreSQL as my database instead of SQLite, and I ran into this error when I run
python -c "import psycopg2"
to confirm if Postgres has be set up correctly.
After several searches and trying out several solutions, saw this post on stackOverflow where I was told to run this command
So I did that, and it fixed the issue.
I hope this post helps someone and save you of hours of debugging and thanks to my colleagues Ifedapo and Eniola that helped me in solving this and other issues I had when setting up. Gracias