Since Python (properly name is CPython, because exists also Cython, Jython, PyPy and so), you need build all dependencies for it.
$ sudo apt-get update
# Required dependencies
$ sudo apt-get install build-essential
# Optional dependencies
$ sudo apt-get install libbz2-dev libgdbm-dev libsqlite3-dev libreadline6-dev libncurses5-dev libssl-dev zlib1g-dev liblzma-dev tk-dev
After install the Python3.5 from source, try import modules with "C-dependencies" (if no errors, well then Python3.5 installed with full-features)
$python3
Python 3.5.2 (default, Dec 27 2016, 17:04:10)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> import tkinter
>>> import ssl
Debian 8 has by default Python2.7 and Python3.4. So after install Python you will be have three version Python.
$ python -c "import sys; print('Installed python %s' % sys.version[:6])" ; python3.4 -c "import sys; print('Installed python %s' % sys.version[:6])" ; python3.5 -c "import sys; print('Installed python %s' % sys.version[:6])"
Installed python 2.7.9
Installed python 3.4.2
Installed python 3.5.2
In the Debian 9, Python 3.5 will be as default version Python3 https://packages.debian.org/search?keywords=python3.5.
Useful links:
https://askubuntu.com/questions/21547/what-are-the-packages-libraries-i-should-install-before-compiling-python-from-so
ImportError: No module named _ssl
http://bugs.python.org/issue12876
http://www.simplydjango.com/python-on-ubuntu/
Testing environment
$ uname -a
Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.6 (jessie)
Release: 8.6
Codename: jessie