我偶尔需要处理一些遗留Python代码,这些代码是由Python2.5解释器在生产中运行的。我想设置我的开发环境,就像生产一样,所以我需要安装python2.5系列的软件包。
当然,我可以从源代码安装,但我真的更喜欢使用软件包,除非绝对没有办法做到。
但是,这2.5包并不包括在11.04附带的任何apt源中。在哪里可以找到Python2.5包,这些包可能会顺利地与Natty一起工作?
更新:它有效!我应该更仔细地阅读apt-get输出:
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).下面是我为安装Python2.5所做的工作:
: josh@josh; sudo add-apt-repository ppa:fkrull/deadsnakes
: josh@josh; sudo apt-get update
: josh@josh; sudo apt-get install python2.5
[...]
The following packages have unmet dependencies:
python-minimal : Breaks: python2.5-minimal (< 2.5.5-7) but 2.5.4-1ubuntu6.1 is to be installed
python2.5 : Depends: python2.5-minimal (= 2.5.5-8~ppa2~natty3) but 2.5.4-1ubuntu6.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
: josh@josh; sudo apt-get -f install
[...]
The following extra packages will be installed:
python2.5-minimal
Recommended packages:
python2.5
The following packages will be upgraded:
python2.5-minimal
[...]
Do you want to continue [Y/n]?
[...]
Setting up python2.5-minimal (2.5.5-8~ppa2~natty3) ...
: josh@josh; sudo apt-get install python2.5
The following NEW packages will be installed:
python2.5
[...]发布于 2011-05-05 09:15:01
启动板有一个关于这个的主题。
下面是关于在Ubuntu10.10上安装python2.5的教程。在这方面,11.04应该是相同的。
在该网站上,命令如下:
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.5在命令行执行python2.5 file将使用v2.5执行“file”。python file将使用最新版本。
大约一年前,我只使用过一次,所以要警惕陷阱。
https://askubuntu.com/questions/40279
复制相似问题