Homebrew upgrade to Python 2.7.10_2 causes packages to fail with 'image not found' -
following update of homebrew using
brew update brew upgrade --all
that results in updating of python 2.7.10_2, pip (and many other scripts) fails
cffi.ffiplatform.verificationerror: importing '/usr/local/lib/python2.7/site-packages/cryptography/_cryptography_cffi_a269d620xd5c405b7.so': dlopen(/usr/local/lib/python2.7/site-packages/cryptography/_cryptography_cffi_a269d620xd5c405b7.so, 2): library not loaded: /usr/local/lib/libssl.1.0.0.dylib referenced from: /usr/local/lib/python2.7/site-packages/cryptography/_cryptography_cffi_a269d620xd5c405b7.so reason: image not found
what can restore or adjust python configuration works again? did homebrew destroyed it?
traceback (most recent call last): file "/usr/local/bin/eb", line 7, in <module> ebcli.core.ebcore import main file "/usr/local/lib/python2.7/site-packages/ebcli/core/ebcore.py", line 43, in <module> . import globals, base, io, hooks file "/usr/local/lib/python2.7/site-packages/ebcli/core/hooks.py", line 20, in <module> ..lib import aws file "/usr/local/lib/python2.7/site-packages/ebcli/lib/aws.py", line 19, in <module> import botocore.session file "/usr/local/lib/python2.7/site-packages/ebcli/bundled/botocore/session.py", line 27, in <module> import botocore.credentials file "/usr/local/lib/python2.7/site-packages/ebcli/bundled/botocore/credentials.py", line 30, in <module> botocore.utils import instancemetadatafetcher, parse_key_val_file file "/usr/local/lib/python2.7/site-packages/ebcli/bundled/botocore/utils.py", line 25, in <module> botocore.vendored import requests file "/usr/local/lib/python2.7/site-packages/ebcli/bundled/botocore/vendored/requests/__init__.py", line 53, in <module> .packages.urllib3.contrib import pyopenssl file "/usr/local/lib/python2.7/site-packages/ebcli/bundled/botocore/vendored/requests/packages/urllib3/contrib/pyopenssl.py", line 55, in <module> import openssl.ssl file "/usr/local/lib/python2.7/site-packages/openssl/__init__.py", line 8, in <module> openssl import rand, crypto, ssl file "/usr/local/lib/python2.7/site-packages/openssl/rand.py", line 11, in <module> openssl._util import ( file "/usr/local/lib/python2.7/site-packages/openssl/_util.py", line 7, in <module> binding = binding() file "/usr/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 114, in __init__ self._ensure_ffi_initialized() file "/usr/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 126, in _ensure_ffi_initialized cls._modules, file "/usr/local/lib/python2.7/site-packages/cryptography/hazmat/bindings/utils.py", line 31, in load_library_for_binding lib = ffi.verifier.load_library() file "/usr/local/lib/python2.7/site-packages/cffi/verifier.py", line 97, in load_library return self._load_library() file "/usr/local/lib/python2.7/site-packages/cffi/verifier.py", line 207, in _load_library return self._vengine.load_library() file "/usr/local/lib/python2.7/site-packages/cffi/vengine_cpy.py", line 155, in load_library raise ffiplatform.verificationerror(error) cffi.ffiplatform.verificationerror: importing '/usr/local/lib/python2.7/site-packages/cryptography/_cryptography_cffi_a269d620xd5c405b7.so': dlopen(/usr/local/lib/python2.7/site-packages/cryptography/_cryptography_cffi_a269d620xd5c405b7.so, 2): library not loaded: /usr/local/lib/libssl.1.0.0.dylib referenced from: /usr/local/lib/python2.7/site-packages/cryptography/_cryptography_cffi_a269d620xd5c405b7.so reason: image not found
osx 10.10.4; homebrew 0.9.5
tim smith's answer correct (he's homebrew maintainer!) didn't provide actual fix. after combing through these issues https://github.com/homebrew/homebrew/issues/41613 , https://github.com/pyca/cryptography/issues/2138 following should python/pip
working openssl
again
brew link openssl --force pip uninstall cryptography pip install cryptography --no-use-wheel brew unlink openssl
the first link fixes pip temporarily. cryptography library needs rebuilt. , unlinking openssl again.
Comments
Post a Comment