title: Error in the installation of scrapy
body: <p>I just tried to run a simple</p>
  
  <pre><code>sudo pip install scrapy
  </code></pre>
  
  <p>and after the download of every component it gives me an error:</p>
  
  <pre><code>Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-s37cTl/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-62NAJB-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-s37cTl/cffi
  </code></pre>
  
  <p>I satisfy all the dependecies, don't know what can be.
  I run Debian 7.</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: I paste the whole installations terminal output:</p>
  
  <pre><code> :~$ sudo pip install scrapy
      Collecting scrapy
    Using cached Scrapy-0.24.5-py2-none-any.whl
  Collecting cssselect&gt;=0.9 (from scrapy)
    Using cached cssselect-0.9.1.tar.gz
  Collecting queuelib (from scrapy)
    Using cached queuelib-1.2.2-py2.py3-none-any.whl
  Collecting pyOpenSSL (from scrapy)
    Using cached pyOpenSSL-0.14.tar.gz
  Collecting w3lib&gt;=1.8.0 (from scrapy)
    Using cached w3lib-1.11.0-py2.py3-none-any.whl
  Requirement already satisfied (use --upgrade to upgrade): lxml in /usr/local/lib/python2.7/dist-packages (from scrapy)
  Collecting Twisted&gt;=10.0.0 (from scrapy)
    Using cached Twisted-15.0.0.tar.bz2
  Collecting six&gt;=1.5.2 (from scrapy)
    Using cached six-1.9.0-py2.py3-none-any.whl
  Collecting cryptography&gt;=0.2.1 (from pyOpenSSL-&gt;scrapy)
    Using cached cryptography-0.8.tar.gz
  Collecting zope.interface&gt;=3.6.0 (from Twisted&gt;=10.0.0-&gt;scrapy)
    Using cached zope.interface-4.1.2.tar.gz
  Collecting pyasn1 (from cryptography&gt;=0.2.1-&gt;pyOpenSSL-&gt;scrapy)
    Using cached pyasn1-0.1.7.tar.gz
  Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from cryptography&gt;=0.2.1-&gt;pyOpenSSL-&gt;scrapy)
  Collecting enum34 (from cryptography&gt;=0.2.1-&gt;pyOpenSSL-&gt;scrapy)
    Using cached enum34-1.0.4.tar.gz
  Collecting cffi&gt;=0.8 (from cryptography&gt;=0.2.1-&gt;pyOpenSSL-&gt;scrapy)
    Using cached cffi-0.9.2.tar.gz
  Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/local/lib/python2.7/dist-packages (from cffi&gt;=0.8-&gt;cryptography&gt;=0.2.1-&gt;pyOpenSSL-&gt;scrapy)
  Installing collected packages: cffi, enum34, pyasn1, zope.interface, cryptography, six, Twisted, w3lib, pyOpenSSL, queuelib, cssselect, scrapy
    Running setup.py install for cffi
      building '_cffi_backend' extension
      gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-i686-2.7/c/_cffi_backend.o
      c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
      compilation terminated.
      error: command 'gcc' failed with exit status 1
      Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-tIHlcr/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-dPM9YP-record/install-record.txt --single-version-externally-managed --compile:
      running install
  
      running build
  
      running build_py
  
      creating build
  
      creating build/lib.linux-i686-2.7
  
      creating build/lib.linux-i686-2.7/cffi
  
      copying cffi/lock.py -&gt; build/lib.linux-i686-2.7/cffi
  
      copying cffi/model.py -&gt; build/lib.linux-i686-2.7/cffi
  
      copying cffi/api.py -&gt; build/lib.linux-i686-2.7/cffi
  
      copying cffi/vengine_gen.py -&gt; build/lib.linux-i686-2.7/cffi
  
      copying cffi/gc_weakref.py -&gt; build/lib.linux-i686-2.7/cffi
  
      copying cffi/vengine_cpy.py -&gt; build/lib.linux-i686-2.7/cffi
  
      copying cffi/verifier.py -&gt; build/lib.linux-i686-2.7/cffi
  
      copying cffi/ffiplatform.py -&gt; build/lib.linux-i686-2.7/cffi
  
      copying cffi/__init__.py -&gt; build/lib.linux-i686-2.7/cffi
  
      copying cffi/cparser.py -&gt; build/lib.linux-i686-2.7/cffi
  
      copying cffi/commontypes.py -&gt; build/lib.linux-i686-2.7/cffi
  
      copying cffi/backend_ctypes.py -&gt; build/lib.linux-i686-2.7/cffi
  
      running build_ext
  
      building '_cffi_backend' extension
  
      creating build/temp.linux-i686-2.7
  
      creating build/temp.linux-i686-2.7/c
  
      gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-i686-2.7/c/_cffi_backend.o
  
      c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
  
      compilation terminated.
  
      error: command 'gcc' failed with exit status 1
  
      ----------------------------------------
      Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-tIHlcr/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-dPM9YP-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-tIHlcr/cffi
  </code></pre>