怎么在Ubuntu安装python3.6(系统默认安装的是3.5)

sudo add-apt-repository ppa:jonathonf/python-3.6


down voteacceptedUbuntu 14.04 and 16.04

If you are using Ubuntu 14.04 or 16.04, you can use J Fernyhough's PPA athttps://launchpad.net/~jonathonf/+archive/ubuntu/python-3.6:

sudo add-apt-repository ppa:jonathonf/python-3.6sudo apt-get update

sudo apt-get install python3.6

Alternatively, you can use Felix Krull's deadsnakes PPA athttps://launchpad.net/~deadsnakes/+archive/ubuntu/ppa:

sudo add-apt-repository ppa:deadsnakes/ppa

sudo apt-get update

sudo apt-get install python3.6

Ubuntu 16.10 and 17.04

If you are using Ubuntu 16.10 or 17.04, then Python 3.6 is in the universe repository, so you can just run:

sudo apt-get update

sudo apt-get install python3.6

After installation for Ubuntu 14.04, 16.04, 16.10 and 17.04

To invoke the Python 3.6 interpreter, runpython3.6.

Ubuntu 17.10

Ubuntu 17.10 already comes with Python 3.6 as default. Just runpython3to invoke it.

你可能感兴趣的:(怎么在Ubuntu安装python3.6(系统默认安装的是3.5))