pypidjango95% confidence\u2191 108

"Failed building wheel for psycopg2" - MacOSX using virtualenv and pip

Full error message
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 this problem for other operating systems, such as Ubuntu, but can't find any good solutions for Mac. 

This is the relevant code being run:

virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt

After running that block, I get the following errors:

  AssertionError

  
  
  
  Failed building wheel for django-toolbelt
   Running setup.py bdist_wheel for psycopg2

...

  AssertionError

  
  
  
  Failed building wheel for psycopg2
   Failed to build django-toolbelt psycopg2

I believe I've installed the "django-toolbelt" and "psycopg2", so I'm not sure why it would be failing. 

The only difference I can think of is that I did not use the command

sudo apt-get install libpq-dev

as was instructed for Ubuntu usage as I believe that installing postgresql with brew took care of the header. 

Thanks for any help or insight!

For MacOS users After trying all the above methods (which did not work for me on MacOS 10.14), that one worked : Install openssl with brew install openssl if you don't have it already. add openssl path to LIBRARY_PATH : export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/ install psycopg2 with pip pip3 install psycopg2

API access

Get this solution programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/error/0fdae9f00541fc3d2b3885885ba936beb8d8480925aadf97b520c0134971a10f
hash \u00b7 0fdae9f00541fc3d2b3885885ba936beb8d8480925aadf97b520c0134971a10f
"Failed building wheel for psycopg2" - MacOSX usin… — DepScope fix | DepScope