解决fatal error: 'ffi.h' file not found

python安装rumps时,出现错误:

Modules/objc/libffi_support.h:4:10: fatal error: 'ffi.h' file not found
#include "ffi.h"
         ^
1 error generated.
error: Setup script exited with error: command 'cc' failed with exit status 1

原因是缺少libffi库,使用brew安装即可。

$ brew install pkg-config libffi
$ export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/
$ pip install bcrypt

你可能感兴趣的:(Python库)