MAC 安装psycopg2报错ld: library not found for -lssl

pip3 install psycopg2

报错:
ld: library not found for -lssl

解决参考:https://github.com/PyMySQL/mysqlclient-python/issues/169

安装前定义这两个环境变量就好了

export LDFLAGS="-L/usr/local/opt/openssl/lib"

export CPPFLAGS="-I/usr/local/opt/openssl/include"

猜你喜欢

转载自blog.51cto.com/cstsncv/2459130