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

DonutGaz picture DonutGaz · Jul 20, 2015 · Viewed 80.5k times · Source

I have installed libffi on my Linux server as well as correctly set the PKG_CONFIG_PATH environment variable to the correct directory, as pip recognizes that it is installed; however, when trying to install pyOpenSSL, pip states that it cannot find file 'ffi.h'. I know both thatffi.h exists as well as its directory, so how do I go about closing this gap between ffi.h and pip?

Answer

Lennart Regebro picture Lennart Regebro · Jul 20, 2015

You need to install the development package as well.

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