首页 > 网事如风 > Debian 安装 Python 2.7
2013
03-01

Debian 安装 Python 2.7

原文http://www.coder4.com/archives/1551
Debian5 (lenny)上安装的python是2.5的,很老,怎么安装2.7的呢?
除了编译之外,我们还可以用apt的方法搞定。如下:
1、修改源
实际上python2.7在unstable源中

sudo vim /etc/apt/sources.list
#添加
deb http://ftp.us.debian.org/debian/ unstable main contrib non-free
#更新
sudo apt-get update

2、安装

sudo apt-get install python2.7

3、替换

sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
觉得文章有用,微信打赏一元。