Skip to main content

Installing Psycopg2 in Macos

·48 words·1 min
Table of Contents

TL;DR #

env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip install psycopg2

# OR

env LDFLAGS="-I/usr/local/opt/openssl@3/include -L/usr/local/opt/openssl@3/lib" pip install psycopg2

# OR

# https://github.com/brianmario/mysql2/issues/795#issuecomment-337006164
env LIBRARY_PATH="/usr/local/opt/openssl@3/lib" pip install psycopg2 --no-cache

Source: https://stackoverflow.com/questions/26288042/error-installing-psycopg2-library-not-found-for-lssl/39244687#39244687

The reason is that probably it might work faster in my machine if it was installed using the not binary version