OS: monterey macOSv12.0.1 python venv: 3.9.9
requirements.in
# To update requirements.txt, run:
#
# pip-compile requirements.in
#
# To install in localhost, run:
#
# pip-sync requirements.txt
#
django==3.2.10 # https://www.djangoproject.com/
psycopg2-binary==2.9.2 # https://github.com/psycopg/psycopg2
After i turn on venv, then i type pip-compile requirements.in
then i get a bunch of errors about pg_config not found
This is my asciinema https://asciinema.org/a/sl9MqmrayLAR3rRxEul4mYaxw
I have tried env LDFLAGS='-L/usr/local/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib' pip-compile requirements.in
but same.
Please advise.
I appreciate the other 2 answers from @Vishnudev and @cetver 🙏
But I tried to install postgresql using brew install and it took a very long time and I still cannot complete after 20 mins.
I figured this out eventually after much googling
Here are my tech specs of my situation:
Conceptually, what I did is :
Here are my steps I took. It's entirely possible not all steps are needed. But I have limited time so here they are.
brew install openssl
export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@1.1/lib/pkgconfig"
source ~/.zshrc
brew install libpq
export PATH="/opt/homebrew/opt/libpq/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/libpq/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libpq/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/libpq/lib/pkgconfig"
source ~/.zshenv
Links that help me: