Friday, June 14, 2019

pip error - cannot import main [SOLVED] + module has no attribute SSL_ST_INIT

Set python2.7 as default:
sudo update-alternatives --config python

select python2.7

Remove pip:
sudo python -m pip uninstall pip
sudo apt purge --autoremove python-pip

Reinstall it:
sudo apt install python-pip

Check the pip --version:
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

Do not upgrade pip to the latest version.

In case of the following error:
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

sudo python -m easy_install --upgrade pyOpenSSL

No comments:

Post a Comment

Thank you for your comment. Will try to react as soon as possible.

Regards,

Networ King