I recently needed to work with a PostgreSQL database in my Django projects. Normally I just use the default SQLite database as I am not doing anything complex.
So I tried the basics of
psycopg2, but kept running into the following errors:
ERROR: No matching distribution found for psycopg2-binary
ERROR: No matching distribution found for psycopg2
After searching around, I found a solution to my problem. Here are the commands that I used to get working on my Macbook:
brew install postgresql brew install libpq --build-from-source brew install openssl export LDFLAGS="-Lemail@example.com/lib -L/opt/homebrew/opt/libpq/lib" export CPPFLAGS="-Ifirstname.lastname@example.org/include -I/opt/homebrew/opt/libpq/include" pip3 install psycopg2
Note: I am using
I hope this helps in the future.