Import Error - Tornado requires an updated SSL mod

2019-08-15 19:21发布

问题:

while installing juypter notebook on my ubuntu 14.04 I am getting this:

ImportError: Tornado requires an up-to-date SSL module. This means Python 2.7.9+ or 3.4+ (although some distributions have backported the necessary changes to older versions).

Pip is:

pip 10.0.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

how to resolve this ?

回答1:

Latest tornado library doesn't support your interpreter version. You have two options.

Either install old tornado (recommended):

pip install tornado==4.*
pip install jupyter

Or install new python. Ubuntu doesn't provide an official package for it, so you have to use community package:

sudo add-apt-repository ppa:jonathonf/python-2.7
sudo apt-get update
sudo apt-get install python2.7
pip install jupyter


回答2:

python -m pip install --upgrade pip setuptools wheel

ref: https://packaging.python.org/tutorials/installing-packages/