Python 如何解决psycopg2.OperationalError:紧急停堆认证需要libpq版本10或更高版本?

Python 如何解决psycopg2.OperationalError:紧急停堆认证需要libpq版本10或更高版本?,python,postgresql,md5,psycopg2,libpq,Python,Postgresql,Md5,Psycopg2,Libpq,我尝试为PostgreSQL执行以下连接字符串,但收到操作错误:紧急停堆身份验证问题 以下是连接字符串代码: DB_session= psycopg2.connect(database="postgres", user="postgres", password="test", host="some remote URL", port="1534") DB_cursor= DB_session.cu

我尝试为PostgreSQL执行以下连接字符串,但收到操作错误:紧急停堆身份验证问题

以下是连接字符串代码:

DB_session= psycopg2.connect(database="postgres", user="postgres", password="test", host="some remote URL", port="1534")
DB_cursor= DB_session.cursor()
控制台:

Traceback (most recent call last):
File "push.py", line 23 in <module>
DB_session= psycopg2.connect(database="postgres", user="postgres", password="test", host="some remote URL", port="1534")

File "/opt/app-root/lib/python3.6/site-packages/psycopg2/___init.py___", line 126, 
conn = _connect(dsn, connection_factory=connection, **kwasync)
psycopg2.OperationalError: SCRAM authentication requires libpq version 10 or above
回溯(最近一次呼叫最后一次):
文件“push.py”,第23行
DB_session=psycopg2.connect(database=“postgres”,user=“postgres”,password=“test”,host=“some remote URL”,port=“1534”)
文件“/opt/app root/lib/python3.6/site packages/psycopg2/\uuuuuuuu init.py\uuuuuuuuu”,第126行,
连接=连接(dsn,连接工厂=连接,**kwasync)
psycopg2.OperationalError:紧急停堆验证需要libpq版本10或更高版本

需要关于Python2.7和3.6的连接字符串的帮助。无法访问或修改PostgreSQL配置文件、限制。除了紧急停堆验证之外,md5连接字符串也会很有帮助。

使用pip二进制软件包psycopg2 binary安装psycopg2。它附带了支持紧急停堆验证所必需的依赖项