pip error after upgrading pip & scrapy by "pip install --upgrade"
Question: Using debian 8(jessie) amd64 with python 2.7.9. I tried following commands:

    
    
    pip install --upgrade pip
    
    pip install --upgrade scrapy
    

after that, I am getting following pip error

    
    
    root@debian:~# pip
    Traceback (most recent call last):
    File "/usr/local/bin/pip", line 11, in <module>
    load_entry_point('pip==8.1.2', 'console_scripts', 'pip')()
    File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 567, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
    File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2604, in load_entry_point
    return ep.load()
    File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2264, in load
    return self.resolve()
    File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2270, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
    File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 16, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
    File "/usr/local/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
    from pip.download import path_to_url
    File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 39, in <module>
    from pip._vendor import requests, six
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py", line 53, in <module>
    from .packages.urllib3.contrib import pyopenssl
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py", line 54, in <module>
    import OpenSSL.SSL
    File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
    File "/usr/lib/python2.7/dist-packages/OpenSSL/rand.py", line 11, in <module>
    from OpenSSL._util import (
    File "/usr/lib/python2.7/dist-packages/OpenSSL/_util.py", line 4, in <module>
    binding = Binding()
    File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 89, in __init__
    self._ensure_ffi_initialized()
    File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 113, in _ensure_ffi_initialized
    libraries=libraries,
    File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/utils.py", line 80, in build_ffi
    extra_link_args=extra_link_args,
    File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 437, in verify
    lib = self.verifier.load_library()
    File "/usr/local/lib/python2.7/dist-packages/cffi/verifier.py", line 114, in load_library
    return self._load_library()
    File "/usr/local/lib/python2.7/dist-packages/cffi/verifier.py", line 225, in _load_library
    return self._vengine.load_library()
    File "/usr/local/lib/python2.7/dist-packages/cffi/vengine_cpy.py", line 174, in load_library
    lst = list(map(self.ffi._get_cached_btype, lst))
    File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 409, in _get_cached_btype
    BType = type.get_cached_btype(self, finishlist)
    File "/usr/local/lib/python2.7/dist-packages/cffi/model.py", line 61, in get_cached_btype
    BType = self.build_backend_type(ffi, finishlist)
    File "/usr/local/lib/python2.7/dist-packages/cffi/model.py", line 507, in build_backend_type
    base_btype = self.build_baseinttype(ffi, finishlist)
    File "/usr/local/lib/python2.7/dist-packages/cffi/model.py", line 525, in build_baseinttype
    % self._get_c_name())
    cffi.api.CDefError: 'point_conversion_form_t' has no values explicitly defined: refusing to guess which integer type it is meant to be (unsigned/signed, int/long)
    

googled for several similar problem, cffi or cryptography may cause this
problem, but i can't find any clear way to fix it.


Answer: Got the exact same error today, but in a different situation. I suspect this
is related to `cryptography` module.

What helped me was to install a specific version of `cffi` package:

    
    
    pip install cffi==1.7.0 
    

