Я только что установил/обновил следующие пакеты в своей системе (Mac OSX 10.7.5, используя python 2.7.11).
package | build
---------------------------|-----------------
enum34-1.1.2 | py27_0 55 KB
idna-2.0 | py27_0 123 KB
ipaddress-1.0.14 | py27_0 27 KB
pyasn1-0.1.9 | py27_0 54 KB
pycparser-2.14 | py27_0 147 KB
cffi-1.2.1 | py27_0 167 KB
cryptography-1.0.2 | py27_0 370 KB
pyopenssl-0.14 | py27_0 122 KB
ndg-httpsclient-0.3.3 | py27_0 30 KB
------------------------------------------------------------
Total: 1.1 MB
Впоследствии я получаю следующую ошибку при попытке вызвать pip или anaconda:
'CompiledFFI' object has no attribute 'def_extern'
Что происходит и как это исправить?
Здесь отображается полное сообщение об ошибке:
$ conda
Traceback (most recent call last):
File "/Users/User/miniconda/bin/conda", line 5, in <module>
sys.exit(main())
File "/Users/User/miniconda/lib/python2.7/site-packages/conda/cli/main.py", line 118, in main
from conda.cli import main_search
File "/Users/User/miniconda/lib/python2.7/site-packages/conda/cli/main_search.py", line 12, in <module>
from conda.misc import make_icon_url
File "/Users/User/miniconda/lib/python2.7/site-packages/conda/misc.py", line 19, in <module>
from conda.api import get_index
File "/Users/User/miniconda/lib/python2.7/site-packages/conda/api.py", line 10, in <module>
from conda.fetch import fetch_index
File "/Users/User/miniconda/lib/python2.7/site-packages/conda/fetch.py", line 24, in <module>
from conda.connection import CondaSession, unparse_url, RETRIES
File "/Users/User/miniconda/lib/python2.7/site-packages/conda/connection.py", line 24, in <module>
import requests
File "/Users/User/miniconda/lib/python2.7/site-packages/requests/__init__.py", line 53, in <module>
from .packages.urllib3.contrib import pyopenssl
File "/Users/User/miniconda/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 54, in <module>
import OpenSSL.SSL
File "/Users/User/miniconda/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/Users/User/miniconda/lib/python2.7/site-packages/OpenSSL/rand.py", line 11, in <module>
from OpenSSL._util import (
File "/Users/User/miniconda/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding
File "/Users/User/miniconda/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 68, in <module>
error=-1)
File "/Users/User/miniconda/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 57, in wrapper
ffi.def_extern(name=name, **kwargs)(func)
AttributeError: 'CompiledFFI' object has no attribute 'def_extern'