2011-05-21 110 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