Python and OpenSSL version reference issue on OS X
Use this as a workaround:
export CRYPTOGRAPHY_ALLOW_OPENSSL_098=1
This appears to be a recent check of the hazmat cryptography library. You can see the source code at:
https://github.com/pyca/cryptography/blob/master/src/cryptography/hazmat/bindings/openssl/binding.py#L221
The CRYPTOGRAPHY_ALLOW_OPENSSL_098
environment variable downgrades the error to a deprecation warning, if you are willing to take the risk. I also ran into this on OS X in just the past day, so something changed recently.
You can install a version of python that uses a newer version of openssl.
First you can brew install a new version of open SSL
brew update
brew install openssl
brew link --force openssl
You should see a newer version with
openssl version -a
Then you can install a different version of python which uses that newer version of openssl. If you use pyenv, that would be:
CFLAGS="-I$(brew --prefix openssl)/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib" \
pyenv install -v 3.4.3
You can find more information about installing a version of python with a brew installed version of openssl here: https://github.com/yyuu/pyenv/wiki/Common-build-problems