I just now downloaded Python 3.5.2 onto my Debian machine and built it with:
./configure
make
make test
sudo make install
Everything worked, but in the make test
output, it showed the installer as having skipped certain tests due to the modules _tkinter and _ssl not being installed. Furthermore, the lack of SSL makes me unable to use pip. This also happened on my build of 3.5.1, but I assumed that it was just an early, buggy version. How can I fix this? I especially need SSL in order to send emails.
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:
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
来源:https://stackoverflow.com/questions/39626755/ssl-and-tkinter-not-present-on-source-build-of-python-3-5-2-debian-linux