Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tdsmith
Created August 19, 2015 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdsmith/4b502c5cc6e7d358acdf to your computer and use it in GitHub Desktop.
Save tdsmith/4b502c5cc6e7d358acdf to your computer and use it in GitHub Desktop.
# force-link openssl
brew unlink openssl
brew link --force openssl
# set up a python environment with a non-Homebrew python.
# you can do this by installing pip against system python, or you
# can do it with a virtualenv.
pip install virtualenv # do this with any Python
virtualenv -p /usr/bin/python /tmp/systempython
source /tmp/systempython/bin/activate
# install cryptography with system Python
# no-use-wheel disables installing from the user cache of previously built wheels
pip install -U -v --force-reinstall --no-use-wheel cryptography pyopenssl
# will fail
python -c 'import OpenSSL'
# shows system OpenSSL link
otool -L /tmp/systempython/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so
# clean up
deactivate
rm -rf /tmp/systempython
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment