简体   繁体   中英

Can't Install psycopg2 on Azure

I am creating a pipeline with a python script on Azure Web Service.

My script uses psycopg2 to connect to the postgres database

but I am getting an error trying to import psycopg2 saying

from psycopg2._psycopg import ( # noqa ImportError: /home/site/wwwroot/antenv/lib/python3.7/site-packages/psycopg2/_psycopg.cpython-37m-x86_64-linux-gnu.so: undefined symbol: PQencryptPasswordConn

any help would be apprciated

PQencryptPasswordConn was introduced in PostgreSQL v10. So you must be trying to use psycopg2 with a libpq that is older than that.

The solution is to upgrade your PostgreSQL client.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM