如果不是root账户,命令前加sudo
安装:
1、add-apt-repository ppa:jonathonf/python-3.6
2、apt-get update
3、apt-get install python3.6
配置只输入python3时就默认使用3.6版本:
1、update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
2、update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
3、update-alternatives --config python3
4、python3 -V
设置pip:
1、apt-get install python3-pip # Python3
2、apt-get install python-pip # Python2