ImportError: cannot import name HTTPSHandler using PIP

后端 未结 12 1851
刺人心
刺人心 2020-11-28 07:35

Facing an HTTPSHandler error while installing python packages using pip, following is the stack trace,

--------desktop:~$ pip install Django==1.3
Traceback (         


        
12条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-28 07:51

    Another symptom of this problem for me was if I went into the python console of my virtualenv and did import ssl it would error out. Turns out my virtualenv wasn't using the brew version of python, just the default install on my machine. No clue why the default install suddenly stopped working, but here's how I fixed it the problem:

    • rmvirtualenv myvirtualenv
    • brew update
    • brew reinstall python
    • mkvirtualenv -p /usr/local/Cellar/python/whatever_version_number/bin/python myvirtualenv

提交回复
热议问题