环境:debian 8 64位
步骤:
1.Linux 默认,运行的python版本是2.7 2. 安装python3 复制代码:
apt-get install python3
3 即使安装了python3,默认还是使用python2 4. 使用 update-alternatives 来管理python的使用版本 复制代码:
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2
5.现在运行python,默认是使用3.4版本了 复制代码:
python --version