在Ubuntu上安装psycopg2 [英] Install psycopg2 on Ubuntu

查看:173
本文介绍了在Ubuntu上安装psycopg2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Ubuntu 12.04上安装python postgres客户端模块。该指南将执行以下操作:

I'm trying to get the python postgres client module installed on Ubuntu 12.04. The guidance is to do the following:

apt-get install python-psycopg2

但是, apt 表示无法找到该软件包。

我很想通过 apt 安装它。这是我可以安装的另一个软件包的一部分吗?

However, apt says that the package can't be located.
I'm keen to install this through apt. Is this part of another package that I can install?

推荐答案

使用Ubuntu 12.04对我来说似乎很好:

Using Ubuntu 12.04 it appears to work fine for me:

jon@minerva:~$ sudo apt-get install python-psycopg2
[sudo] password for jon: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  python-psycopg2-doc
The following NEW packages will be installed
  python-psycopg2
0 upgraded, 1 newly installed, 0 to remove and 334 not upgraded.
Need to get 153 kB of archives.

您到底遇到什么错误?-仔细检查了拼写psycopg对-这通常是一个陷阱...并且运行 apt-get更新来确保您的回购从来没有什么坏处。是最新的。

What error are you getting exactly? - double check you've spelt psycopg right - that's quite often a gotcha... and it never hurts to run an apt-get update to make sure your repo. is up to date.

这篇关于在Ubuntu上安装psycopg2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆