Install python 3.5.7 on debian:
From python.org:
Python 3.5.7 has only been released in source code form; no more official binary installers will be produced.
Install build dependencies (not sure list is complete):
sudo apt install build-dep python-psycopg2
Then,
wget https://www.python.org/ftp/python/3.5.7/Python-3.5.7.tgz
tar -xvzf Python-3.5.7.tgz
cd Python-3.5.7
./configure --enable-optimizations
make
make altinstall
sources: