pip cffi package installation failed on osx pip cffi package installation failed on osx python python

pip cffi package installation failed on osx


In your terminal try and run:

xcode-select --install

After that try installing the package again.

By default, XCode installs itself as the IDE and does not set up the environment for the use by command line tools; for example, the /usr/include folder will be missing.

Running the above command will install the tools necessary to run compilation from the command line and create the required symbolic links. Since Python packages compile native code parts using the command-line interface of XCode, this step is required to install Python packages that include native components.

You only need to do this once per XCode install/upgrade, or if you see a similar error.


Install CLI development toolchain with

$ xcode-select --install

If you have a broken pkg-config, unlink it with following command as mentioned in comments.

$ brew unlink pkg-config

Install libffi package

$ brew install pkg-config libffi

and then install cffi

$ pip install cffi

Source: Error installing bcrypt with pip on OS X: can't find ffi.h (libffi is installed)


Running the below command in terminal took care of my issue.

xcode-select --install