python/pip error on osx

Ok I found out online that these errors are related to openssl. But i already had openssl installed. A little more research and I tried the following and it solved the issue for me. Here's my solution in case you get the same error.

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

Hope that helps.


The brew install openssl solution above did not work for with using Python 3. Then I realized that I had installed Python 3.4.2 but the "No HTTPSHandler" exception was looking in /usr/local/Cellar/python3/3.4.1/....

After deleting all older Python 3 paths and reinstalling virtualenv it works again:

pip3 uninstall virtualenv
pip3 install virtualenv

Note that install --upgrade didn't work, needs to be uninstalled first.


I had to manually add library linking to make it works because I had error with brew link openssl --force

brew update    
brew install openssl    
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/    
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
brew uninstall python
brew install python --with-brewed-openssl

Tags:

Python

Macos