Yesterday I uninstalled python 3.7 version by mistake. Then I install python again (this time 3.8 version) and again set up my environment. But I could not start my Django project which has Postgres connection. Actually I cannot install "psycopg2" in my environment. I searched for hours and implement every solutions I get from online but it does not work. Let me tell you what I did so far.
- First it said to add Postgres in my PATH so I added
C:\Program Files\PostgreSQL\12\bin\
in my PATH. A new problem then arise with a huge ERROR report with 2 vital Error.
ERROR: Failed building wheel for psycopg2
..........................
Running setup.py install for psycopg2 ... error
I try to upgrade wheel but it says,
Requirement already up-to-date
http://initd.org/psycopg/docs/install.html#install-from-source I learned from this site that psycopg2 requires python2 version. So I installed python 2.7 also.
- I reinstalled PostgreSQL but it does not work.
- I deleted my virtual environment and create again but it does not work.
- Some says they solve this problem by running
pip install psycopg2-binary
But it does not work for me.
Please help me to get rid of this. I stuck for hours.