解決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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章