2014-10-12 211 views
2

这个question类似,我在Cygwin的下安装bcrypt,并收到此错误麻烦:错误与PIP在Cygwin安装bcrypt:找不到ffi.h(安装libffi)

Downloading/unpacking bcrypt 
    Downloading bcrypt-1.0.2.tar.gz (40kB): 40kB downloaded 
    Running setup.py (path:/tmp/pip_build_Chris/bcrypt/setup.py) egg_info for package bcrypt 
    c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory 
    #include <ffi.h> 
        ^
    compilation terminated. 
... 
    distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1 
    Complete output from command python setup.py egg_info: 
    c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory 

#include <ffi.h> 
       ^

compilation terminated. 

libffi-devel软件包已安装,并且我也尝试使用--global-option='-I/lib/libffi-3.0.13/include'参数告诉pip确切地说我的系统上有ffi.h文件。

+0

而安装Python-glanceclient我得到了相同的错误消息。就我而言,我通过添加cygwin软件包“libffi-devel”来解决这个问题。 – mcoolive 2015-04-30 06:43:49

回答

0

我遇到了同样的问题。

修正了这个问题:

cp /usr/lib/libffi-3.0.13/include/*.h /usr/include