Install Python 3.6 on Ubuntu 16.04 Xenial
By default Ubuntu is shipped with Python 3.5.2 or whatever but to use latest version (e.g. 3.6.4 as in example below) you need to install it manually. So we need to download dependencies, source code and the build it by yourself. You may execute commands from your home directory or from any other temporary directory (we need source code only once)
1 | $ sudo apt install build-essential zlib1g-dev libreadline-dev libssl-dev openssl |
And that’s it!
Now verify your installation with
1 | $ pip3 --version |
If you want to type python3
in terminal and open a latest installation you may need to symlink your executable with the alias like this
1 | $ which python3 # output path 1 |
Enjoy!