与此问题类似,我在 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
文件在我的系统上的位置。