Skip to content

Instantly share code, notes, and snippets.

@szs8
Created June 7, 2013 14:55
Show Gist options
  • Save szs8/5729845 to your computer and use it in GitHub Desktop.
Save szs8/5729845 to your computer and use it in GitHub Desktop.
Fixing openssl errors on OS X with anaconda python distribution
OS X ships with an ancient version of openssl and I ran into problems using starcluster with Anaconda python distribution (APD).
Every starcluster command failed with the following error:
SSLError: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
The continuum guys are working on fix. Meanwhile a quick workaround is to use homebrew to build python with a newer openssl version and then substitute the _ssl.so in APD with the homebrew _ssl.so
1) brew install python --with-brewed-openssl
2) Go to anaconda/lib/python2.7/lib-dynload and
ln -s /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so _ssl.so
In [1]: import ssl
In [2]: ssl.OPENSSL_VERSION
Out[2]: 'OpenSSL 1.0.1e 11 Feb 2013'
And now everythings works as expected with starcluster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment