类似于此question ,我在 Cygwin 下安装 bcrypt 时遇到问题,并收到此错误:
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
文件在我的系统上的确切位置。
最佳答案
我能够在 Cygwin 下从源代码构建/安装此实现:https://bitbucket.org/alexandrul/py-bcrypt/overview
关于python - 在 Cygwin : cant find ffi. h 上使用 pip 安装 bcrypt 时出错(已安装 libffi),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26325233/