Linux下安装Python-3.3.2

# 下载最新版本
cd /usr/local/src/
sudo wget http://www.python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
sudo chmod 777 Python-3.3.2.tar.bz2 
sudo tar -jx -f Python-3.3.2.tar.bz2

# 安装

cd Python-3.3.2/
./configure --prefix=/usr/local/Python-3.3.2/
sudo make
sudo make install

# 浏览旧版本
cd /usr/bin/
ls -l python*

# 配置新版本:
echo $PATH
PATH=$PATH:/usr/local/Python-3.3.2/bin
echo $PATH

# 链接新版本
cd /usr/bin/
sudo rm -rf python
sudo ln -s /usr/local/Python-3.3.2/bin/python3 ./python

# 输入python检查是否更新,进入后可输入exit()退出python.
python

# 还原旧版本:
ll python*
sudo rm -rf python
sudo ln -s /usr/bin/python2.6 ./python
来源: http://www.cnblogs.com/KiloNet/archive/2013/06/20/3145786.html

你可能感兴趣的:(Linux下安装Python-3.3.2)