With Release of Python 3.6 a lot of new features has been introduced. One of my favourite is literal string interpolation (PEP 498). Check the this link for new features that got shipped with Python 3.6.

I currently have python 3.5 installed on my ubuntu 16.04 box. Since there was no official python 3.6 package, i decided to compile python 3.6 from source.

I downloaded the python 3.6 source from this link and extracted to my /usr/local/src directory. Then i ran "configure" script with the following options:

./configure --enable-ipv6 --enable-loadable-sqlite-extensions --with-ensurepip -with-system-expat --with-system-ffi --with-fpectl --with-zlib

After that i used "checkconfig" utility from apt-get to build the "deb" package. That way if i want to uninstall later on i can do it by issuing the command dpkg -r python3.6

sudo checkinstall -y -D --install=no --pkgname=python3.6

Once the command is complete, you can verify if the python 3.6 installed correctly by running

dpkg -l |grep python

Note: If you want to verify which configuration parameters your python was built against, you can run the following command:

python3.6 -c 'import sysconfig; print(sysconfig.get_config_var('CONFIG_ARGS'))'

Happy Python Programming.