首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >无法安装python adb - M2Crypto错误

无法安装python adb - M2Crypto错误
EN

Stack Overflow用户
提问于 2018-07-04 02:35:24
回答 1查看 1.1K关注 0票数 0

我试过安装python adb。

对于pip和旧版安装,我得到了相同的错误。

代码语言:javascript
复制
Writing C:\Users\ARAJO~1\AppData\Local\Temp\easy_install-q9rc0j_2\M2Crypto-

0.26.4\setup.cfg
Running M2Crypto-0.26.4\setup.py -q bdist_egg --dist-dir C:\Users\ARAJO~1\AppData\Local\Temp\easy_install-q9rc0j_2\M2Crypto-0.26.4\egg-dist-tmp-tf0svopa
_m2crypto_wrap.c
SWIG/_m2crypto_wrap.c(3550): warning C4068: unknown pragma
SWIG/_m2crypto_wrap.c(3551): warning C4068: unknown pragma
SWIG/_m2crypto_wrap.c(3554): fatal error C1083: Cannot open include file: 'openssl/err.h': No such file or directory
error: Setup script exited with error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

编辑:

在密码学安装和配置之后:我得到了这个错误,这是什么原因呢?

代码语言:javascript
复制
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\stdio.h(2448): note: see declaration of 'fdopen'
SWIG/_m2crypto_wrap.c(7653): error C2332: 'struct': missing tag name
SWIG/_m2crypto_wrap.c(7653): error C2143: syntax error: missing ')' before '*'
SWIG/_m2crypto_wrap.c(7653): error C2143: syntax error: missing '{' before '*'
SWIG/_m2crypto_wrap.c(7653): error C2059: syntax error: ')'
SWIG/_m2crypto_wrap.c(7654): error C2054: expected '(' to follow 'tzp'
SWIG/_m2crypto_wrap.c(7681): warning C4013: 'gettimeofday' undefined; assuming extern returning int
SWIG/_m2crypto_wrap.c(9489): error C2037: left of 'num' specifies undefined struct/union 'stack_st'
SWIG/_m2crypto_wrap.c(9509): error C2037: left of 'num' specifies undefined struct/union 'stack_st'
SWIG/_m2crypto_wrap.c(9538): error C2037: left of 'data' specifies undefined struct/union 'stack_st'
SWIG/_m2crypto_wrap.c(9558): error C2037: left of 'data' specifies undefined struct/union 'stack_st'
SWIG/_m2crypto_wrap.c(9587): error C2037: left of 'sorted' specifies undefined struct/union 'stack_st'
SWIG/_m2crypto_wrap.c(9607): error C2037: left of 'sorted' specifies undefined struct/union 'stack_st'
SWIG/_m2crypto_wrap.c(9636): error C2037: left of 'num_alloc' specifies undefined struct/union 'stack_st'
SWIG/_m2crypto_wrap.c(9656): error C2037: left of 'num_alloc' specifies undefined struct/union 'stack_st'
SWIG/_m2crypto_wrap.c(9684): error C2037: left of 'comp' specifies undefined struct/union 'stack_st'
SWIG/_m2crypto_wrap.c(9704): error C2037: left of 'comp' specifies undefined struct/union 'stack_st'
SWIG/_m2crypto_wrap.c(9716): error C2027: use of undefined type 'stack_st'
C:\OpenSSL-win64\include\openssl/stack.h(17): note: see declaration of 'stack_st'
SWIG/_m2crypto_wrap.c(9947): warning C4090: 'function': different 'const' qualifiers
SWIG/_m2crypto_wrap.c(9947): warning C4028: formal parameter 1 different from declaration
SWIG/_m2crypto_wrap.c(10350): error C2037: left of 'stack' specifies undefined struct/union 'stack_st_OPENSSL_STRING'
SWIG/_m2crypto_wrap.c(10370): error C2037: left of 'stack' specifies undefined struct/union 'stack_st_OPENSSL_STRING'
SWIG/_m2crypto_wrap.c(10382): error C2027: use of undefined type 'stack_st_OPENSSL_STRING'
C:\OpenSSL-win64\include\openssl/safestack.h(151): note: see declaration of 'stack_st_OPENSSL_STRING'
SWIG/_m2crypto_wrap.c(10430): error C2037: left of 'stack' specifies undefined struct/union 'stack_st_OPENSSL_BLOCK'
SWIG/_m2crypto_wrap.c(10450): error C2037: left of 'stack' specifies undefined struct/union 'stack_st_OPENSSL_BLOCK'
SWIG/_m2crypto_wrap.c(10462): error C2027: use of undefined type 'stack_st_OPENSSL_BLOCK'
C:\OpenSSL-win64\include\openssl/safestack.h(159): note: see declaration of 'stack_st_OPENSSL_BLOCK'
SWIG/_m2crypto_wrap.c(19168): warning C4013: 'sslv3_method' undefined; assuming extern returning int
SWIG/_m2crypto_wrap.c(29537): error C2078: too many initializers
SWIG/_m2crypto_wrap.c(29443): warning C4113:

这和套餐有关吗??谢谢

EN

回答 1

Stack Overflow用户

发布于 2018-07-04 04:44:19

你必须让OpenSSL包含文件和库,并且你必须提示编译器它们在哪里。请参阅https://cryptography.io/en/latest/installation/#building-cryptography-on-windows

例如:

代码语言:javascript
复制
C:\> \path\to\vcvarsall.bat x86_amd64
C:\> set LIB=C:\OpenSSL-win64\lib;%LIB%
C:\> set INCLUDE=C:\OpenSSL-win64\include;%INCLUDE%
C:\> pip install cryptography
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51161025

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档