简体   繁体   English

将PostgreSQL客户端库更新到9.1

[英]update PostgreSQL client library to 9.1

I am installing psycopg2 using this command: 我正在使用以下命令安装psycopg2:

pip3 install psycopg2

But the output is: 但是输出是:

./psycopg/psycopg.h:30:2: error: #error "Psycopg requires PostgreSQL client library (libpq) >= 9.1" ./psycopg/psycopg.h:30:2:错误:#error“ Psycopg需要PostgreSQL客户端库(libpq)> = 9.1”

My pg_config version: pg_config --version is PostgreSQL 8.4.20 . 我的pg_config版本: pg_config --versionPostgreSQL 8.4.20 How to upgrade PostgreSQL client library? 如何升级PostgreSQL客户端库? I am searching from Google, but no method to guide me. 我正在从Google搜索,但没有任何方法可以指导我。 Python version: 3.5.0. Python版本:3.5.0。

我猜您需要根据以下说明进行安装-https: //www.postgresql.org/download/linux/redhat/

Upgrade pip version 7.1.2 to version 18.1 solve this problem: 将pip版本7.1.2升级到版本18.1可解决此问题:

pip3 install --upgrade pip

Execute this command to install psycopg2 : 执行以下命令来安装psycopg2

pip3 install psycopg2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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