centos6.5安装psycopg2(离线安装)

一、基础环境

在这里插入图片描述

二、安装psycopg2需要安装依赖

#所需要的依赖包
[root@hadoop-e06 ~]# rpm -qa |grep postgresql
postgresql96-libs-9.6.23-1PGDG.rhel6.x86_64
postgresql96-devel-9.6.23-1PGDG.rhel6.x86_64
postgresql96-9.6.23-1PGDG.rhel6.x86_64
#安装依赖命令
rpm -ivh postgresql96-9.6.23-1PGDG.rhel6.x86_64.rpm
rpm -ivh postgresql96-devel-9.6.23-1PGDG.rhel6.x86_64.rpm
rpm -ivh postgresql96-libs-9.6.23-1PGDG.rhel6.x86_64.rpm

三、离线安装psycopg2

tar -zxvf psycopg2-2.7.3.tar.gz
cd psycopg2-2.7.3
python3 setup.py build
python3 setpy.py install

四、问题记录

#报错如下:
Error: pg_ config executable not found.
Please add the directory containing pg_ config to the PATH 
or specify the full executable path with the option:
python setup.py build ext --pg-config /path/to/pg_ config build
or with the pg_ config option in ' setup.cfg'.
#解决方案
rpm -ivh python-devel-2.6.6-51.el6.x86_64.rpm

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值