I\'m attempting to make a website with a few others for the first time, and have run into a weird error when trying to use Django/Python/VirtualEnv. I\'ve found solutions to
I had same problem and this appears to be a Mojave Issue, I was able to resolve with:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
On OS X, I was able to solve this by simply upgrading wheel before installing psycopg2:
pip install --upgrade wheel
I know you are asking for development environment but if you are deploying on server say, Heroku. Just add below line in the requirements.txt of your project.
django-heroku==0.3.1
As this package itself will install the required packages like psycopg2 on server deployment.So let the server(heroku) should take care of it.
I had this issue on several packages, including psycopg2, numpy, and pandas. I simply removed the version from the requirements.txt file, and it worked.
So instead of psycopg2-binary==2.7.6.1 I just had psycopg2-binary.
I tried all the above solutions but they did not work for me. What I did was change the psycopg2 version in my requirements.txt file from psycopg2==2.7.4
to psycopg2==2.7.6
I had the same problem on Arch linux. I think that it's not an OS dependant problem. Anyway, I fixed this by finding the outdated packages and updating then.
pip uninstall psycopg2
pip list --outdated
pip install --upgrade wheel
pip install --upgrade setuptools
pip install psycopg2
hope this helps...