Psycopg2 Python SSL Support is not compiled in

前端 未结 7 1922
梦毁少年i
梦毁少年i 2020-12-16 13:38

I am trying to connect to my postgres database using psycopg2 with sslmode=\'required\' param; however, I get the following error

psycopg2.OperationalError:          


        
7条回答
  •  隐瞒了意图╮
    2020-12-16 14:04

    As I can not comment:
    Adding to Brideau's answer that this only worked for me after changing my version of Postgres.

    brew uninstall postgres
    brew update
    brew install postgres --with-openssl
    

    Then run the code provided by Brideau and it should work.

提交回复
热议问题