无法安装python adb-M2Crypto错误

时间:2018-07-03 18:35:24

标签: python cmd pip

我尝试安装python adb。

使用pip和旧版安装会出现相同的错误。

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

编辑:

安装和配置加密后: 我收到了这个错误,这可能是什么原因?

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:

与包装有关吗? 谢谢

1 个答案:

答案 0 :(得分:0)

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

例如:

cellForRowAt