Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/326.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';t安装python adb-M2Crypto错误_Python_Cmd_Pip - Fatal编程技术网

Can';t安装python adb-M2Crypto错误

Can';t安装python adb-M2Crypto错误,python,cmd,pip,Python,Cmd,Pip,我已尝试安装python adb 对于pip和legacy安装,我得到了相同的错误 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

我已尝试安装python adb

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

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:
它与包装有关吗??
谢谢

您必须让OpenSSL包含文件和库,并且您必须提示编译器它们在哪里。看

例如:

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

我也是,运气好吗s