2011-05-21 109 views
0

我有两个版本的python。 我想为python2.5安装psycopg2psycopg2安装python的多版本

我该如何运行sudo apt-get install python-psycopg2,以便它安装它为python2.5而不是python2.6?

感谢

回答

3

的Ubuntu的10.04包装python-psycopg2被设计成缺省安装python2.6的工作。

要安装的python2.5 psycopg2,download the psycopg source和使用

python2.5 setup.py install 

安装它。 (请注意拨打python2.5)。

+0

对于任何Python包来说都是如此。 disto通常会为其当前构建系统中的“官方”Python提供预构建包。如果你想要另一个版本,你必须自己打包,或从源代码安装。 – Keith 2011-05-21 23:55:09