2

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.

1 Answers1

3

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:

  1. https://askubuntu.com/questions/21547/what-are-the-packages-libraries-i-should-install-before-compiling-python-from-so

  2. ImportError: No module named _ssl

  3. http://bugs.python.org/issue12876

  4. 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
Community
  • 1
  • 1
PADYMKO
  • 4,217
  • 2
  • 36
  • 41