title: python pip install error: command 'gcc' failed with exit status 1
body: <p>I tried install quandl </p>
  
  <pre><code>    pip install quandl
  </code></pre>
  
  <p>but I got following error:</p>
  
  <pre><code>    Collecting quandl
      Using cached Quandl-3.0.1-py2.py3-none-any.whl
      Collecting pyOpenSSL (from quandl)
      Using cached pyOpenSSL-16.0.0-py2.py3-none-any.whl
      Requirement already satisfied (use --upgrade to upgrade): pyasn1 in      /usr/local/lib/python3.2/dist-packages (from quandl)
      Collecting more-itertools (from quandl)
      Using cached more-itertools-2.2.tar.gz
      Requirement already satisfied (use --upgrade to upgrade): six in ./.local/lib/python3.2/site-packages (from quandl)
      Collecting ndg-httpsclient (from quandl)
      Using cached ndg_httpsclient-0.4.1.tar.gz
      Requirement already satisfied (use --upgrade to upgrade): numpy&gt;=1.8 in /usr/local/lib/python3.2/dist-packages (from quandl)
      Requirement already satisfied (use --upgrade to upgrade): python-dateutil in ./.local/lib/python3.2/site-packages (from quandl)
      Requirement already satisfied (use --upgrade to upgrade): pandas&gt;=0.14 in ./.local/lib/python3.2/site-packages (from quandl)
      Collecting requests&gt;=2.7.0 (from quandl)
      Using cached requests-2.10.0-py2.py3-none-any.whl
      Collecting inflection&gt;=0.3.1 (from quandl)
      Using cached inflection-0.3.1.tar.gz
      Collecting cryptography&gt;=1.3 (from pyOpenSSL-&gt;quandl)
      Using cached cryptography-1.4.tar.gz
      Requirement already satisfied (use --upgrade to upgrade): pytz&gt;=2011k in ./.local/lib/python3.2/site-packages (from pandas&gt;=0.14-&gt;quandl)
      Requirement already satisfied (use --upgrade to upgrade): idna&gt;=2.0 in /usr/local/lib/python3.2/dist-packages (from cryptography&gt;=1.3-&gt;pyOpenSSL-&gt;quandl)
      Requirement already satisfied (use --upgrade to upgrade): setuptools&gt;=11.3 in /usr/local/lib/python3.2/dist-packages (from cryptography&gt;=1.3-&gt;pyOpenSSL-&gt;quandl)
      Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/local/lib/python3.2/dist-packages (from cryptography&gt;=1.3-&gt;pyOpenSSL-&gt;quandl)
      Requirement already satisfied (use --upgrade to upgrade): ipaddress in /usr/local/lib/python3.2/dist-packages (from cryptography&gt;=1.3-&gt;pyOpenSSL-&gt;quandl)
      Collecting cffi&gt;=1.4.1 (from cryptography&gt;=1.3-&gt;pyOpenSSL-&gt;quandl)
    Using cached cffi-1.7.0.tar.gz
      Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/local/lib/python3.2/dist-packages (from cffi&gt;=1.4.1-&gt;cryptography&gt;=1.3-&gt;pyOpenSSL-&gt;quandl)
      Installing collected packages: cffi, cryptography, pyOpenSSL, more-itertools, ndg-httpsclient, requests, inflection, quandl
    Running setup.py install for cffi
      Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-svu9h7/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lo33rp-record/install-record.txt --single-version-externally-managed --compile:
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libffi' found
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libffi' found
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libffi' found
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libffi' found
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libffi' found
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-i686-3.2
      creating build/lib.linux-i686-3.2/cffi
      copying cffi/cparser.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/backend_ctypes.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/commontypes.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/vengine_cpy.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/verifier.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/cffi_opcode.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/model.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/api.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/setuptools_ext.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/lock.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/ffiplatform.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/__init__.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/vengine_gen.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/recompiler.py -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/_cffi_include.h -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/parse_c_type.h -&gt; build/lib.linux-i686-3.2/cffi
      copying cffi/_embedding.h -&gt; build/lib.linux-i686-3.2/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.linux-i686-3.2
      creating build/temp.linux-i686-3.2/c
      gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.2mu -c c/_cffi_backend.c -o build/temp.linux-i686-3.2/c/_cffi_backend.o
      c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
      compilation terminated.
  
          error: command 'gcc' failed with exit status 1
  
          Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-svu9h7/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lo33rp-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-svu9h7/cffi
  You are using pip version 7.1.2, however version 8.1.2 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  </code></pre>