pip3 install psycopg2 失败

新配置的centos7服务器,使用pip3 install psycopg2  安装失败

提示:

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

原因:缺少以下环境条件

pip3 install psycopg2 失败_第1张图片

按要求安装

yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install postgresql11
yum install postgresql11-server
yum install postgresql11-libs
yum install postgresql11-contrib
yum install postgresql11-devel

配置 pg_config 路径

export PATH=/usr/pgsql-11/bin/:$PATH

执行

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ psycopg2

 

你可能感兴趣的:(Linux环境配置)