1.输入 sudo add-apt-repository ppa:jonathonf/python-3.6
ubuntu@VM-0-13-ubuntu:~$ sudo add-apt-repository ppa:jonathonf/python-3.6
A plain backport of *just* Python 3.6. System extensions/Python libraries may or may not work.
Don't remove Python 3.5 from your system - it will break.
More info: https://launchpad.net/~jonathonf/+archive/ubuntu/python-3.6
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpo9itxaur/secring.gpg' created
gpg: keyring `/tmp/tmpo9itxaur/pubring.gpg' created
gpg: requesting key F06FC659 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpo9itxaur/trustdb.gpg: trustdb created
gpg: key F06FC659: public key "Launchpad PPA for J Fernyhough" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
提示 ok后就没问题,如果显示超时就请再一次输入刚刚那个命令。
2.输入 sudo apt-get update
就会出现如图代码显示在更新中。
ubuntu@VM-0-13-ubuntu:~$ sudo apt-get update
Hit:1 http://mirrors.tencentyun.com/ubuntu xenial InRelease
Hit:2 http://mirrors.tencentyun.com/ubuntu xenial-security InRelease
Hit:3 http://mirrors.tencentyun.com/ubuntu xenial-updates InRelease
Get:4 http://ppa.launchpad.net/jonathonf/python