mac에서 pip install psycopg2를 입력하면,,설치하가 안되고 에러가 나는 경우가 있다.
아래 설치 방법으로 설치가 가능하다.
$ brew install postgresql
$ /opt/homebrew/opt/python@3.9/bin/python3.9 -m pip install --upgrade pip
$ brew install openssl
$ echo 'export LDFLAGS="-L/opt/homebrew/opt/openssl/lib"' >> ~/.zshrc
$ echo 'export CPPFLAGS="-I/opt/homebrew/opt/openssl/include"' >> ~/.zshrc
$ source ~/.zshrc
$ pip install psycopg2 --no-cache-dir