Prerequirements
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apt-rdepends
Get the stuff needed for compiling
sudo apt-get install `apt-rdepends python3 | grep ^lib`
sudo apt-get install `apt-rdepends python3-dev | grep ^lib`
sudo apt-get install python3-dev
sudo apt-get install python-dev libsqlite3-dev libssl-dev libncurses-dev ncurses-dev
sudo apt-get install libxml2-dev libxslt-dev python-dev # https://github.com/designerror/webdav-client-python
sudo apt-get install libcurl4-openssl-dev python-pycurl # https://github.com/designerror/webdav-client-python
cd ~
mkdir -p software/python3.5/ && cd software/python3.5/
Official Python Download page
gave me the Gzipped source tarball link https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
tar xvzf Python-*.tgz
cd Python-*
./configure --prefix=/opt/python3.5