【问题标题】:Couldnt install Cryptography python module in windows with python 2.7.9无法使用 python 2.7.9 在 Windows 中安装 Cryptography python 模块
【发布时间】:2017-07-17 14:51:11
【问题描述】:

当我执行命令“pip install cryptography”时,它成功安装了一些依赖项,但失败并出现以下错误。

> _openssl.c
C:\Python27\include\openssl/ossl_typ.h(176) : error C2059: syntax error : 'type'
build\temp.win-amd64-2.7\Release\_openssl.c(481) : fatal error C1083: Cannot ope
n include file: 'openssl/cmac.h': No such file or directory

编辑: 1]我已经从“http://gnuwin32.sourceforge.net/packages/openssl.htm”安装了openssl,并将“include”和“lib”文件夹从“C:\Program Files (x86)\GnuWin32”复制到“C:\Python27”

2] 我已经从https://www.microsoft.com/en-in/download/details.aspx?id=44266 安装了“Microsoft Visual C++ Compiler for Python 2.7”

有人可以说我在这里缺少什么吗?非常感谢

【问题讨论】:

标签: windows python-2.7 python-cryptography


【解决方案1】:

在 Windows 上编译密码需要在编译期间设置几个环境变量。幸运的是,您不需要自己编译它。相反,只需将您的 pip 更新到最新版本,它就会为您下载一个预编译的轮子。

【讨论】:

    猜你喜欢
    • 2016-09-23
    • 2015-04-21
    • 1970-01-01
    • 2021-12-23
    • 1970-01-01
    • 2016-04-17
    • 2011-12-28
    • 2019-07-07
    • 1970-01-01
    相关资源
    最近更新 更多