pip cffi package installation failed on osx

﹥>﹥吖頭↗ 提交于 2019-11-29 03:05:36
Yariv Katz

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!