ImportError: cannot import name HTTPSHandler using PIP

后端 未结 12 1848
刺人心
刺人心 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:48

    Homebrew

    This was probably caused by an upgrade to Mavericks. Here's how I fixed it.

    Update OpenSSL

    #make a copy of the existing library, just in case
    sudo cp /usr/bin/openssl /usr/bin/openssl.apple
    
    # update openssl 
    brew update
    brew install openssl
    brew link --force openssl
    
    # reload terminal paths
    hash -r
    

    Reinstall Python

    Python 3

    brew uninstall python3
    
    brew install python3 --with-brewed-openssl
    

    Python 2

    brew uninstall python
    
    brew install python --with-brewed-openssl
    

    This answer consolidates all the Stack Exchange answers and comments I found, and is based mostly on this Apple Stack Exchange answer.

提交回复
热议问题