PIP install unable to find ffi.h even though it recognizes libffi

You need to install the development package as well.

libffi-dev on Debian/Ubuntu, libffi-devel on Redhat/Centos/Fedora.


To add to mhawke's answer, usually the Debian/Ubuntu based systems are "-dev" rather than "-devel" for RPM based systems

So, for Ubuntu it will be apt-get install libffi libffi-dev

RHEL, CentOS, Fedora (up to v22) yum install libffi libffi-devel

Fedora 23+ dnf install libffi libffi-devel

OSX/MacOS (assuming homebrew is installed) brew install libffi


You can use CFLAGS (and LDFLAGS or various other compiler and linker options) in front of the pip command (ditto for setup.py):

Something similar to the following should work:

CFLAGS=-I/usr/include/libffi/include pip install pyOpenSSL

Tags:

Python

Linux

Pip