python - 在 Cygwin : cant find ffi. h 上使用 pip 安装 bcrypt 时出错(已安装 libffi)

标签 python cygwin pip bcrypt libffi

类似于此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/

相关文章:

python - pip线程安全吗?

gcc - 如何在一个要求依赖于 gcc-4.5 版本的情况下使用 pip install

python - Python/pip 如何处理冲突的传递依赖项?

python - 从 Python 脚本调用 Pyramid View

python - 许多 pytest 固定装置与一个大型 "container"固定装置

python - 在 Cygwin 中创建 virtualenv 时出错

c++ - 在cygwin的makeing(编译)代码上,make命令告诉我我需要“ver”和“type”命令

python - Mac OS 10.9 (Mavericks) 卸载了 Django

python - 如何获得 MongoDB 的 Motor 驱动程序?

ruby - 无法在 Windows xp 上的 cygwin 下为 bcrypt-ruby gem 构建 native 扩展