The official recommendation is "you don't actually need newer software"
https://wiki.debian.org/DontBreakDebian#Don.27t_suffer_from_Shiny_New_Stuff_Syndrome
Most of the advice on that page is geared towards what to do if you want the software to be available system-wide, but I don't think that's necessary in this case.
If you fetch the python sources, build the 3.6 interpreter using --prefix
to control where it ends up, and then use virtualenv
with the --python
option, then you can use python 3.6 without affecting anything outside your project.
The process might go something like this:
$ cd ~
$ mkdir pythonroot
$ mkdir opt
$ mkdir app
$ cd opt
$ wget <python tarball>
$ tar -xvf <python tarball>
$ cd python-3.6
$ ./configure --prefix="$HOME"/pythonroot
$ make
$ make install
$ cd ~
$ cd app
$ virtualenv venv --python ~/pythonroot/bin/python
$ . venv/bin/activate
[venv]$ which python
/home/<user>/pythonroot/bin/python