pythonscrypt不';t安装在64位Windows 7上

pythonscrypt不';t安装在64位Windows 7上,python,scrypt,Python,Scrypt,我的机器上似乎没有安装Scrypt。我已经安装了Windows版本。我使用Visual Studio免费版,安装了OpenSSL 32位,并成功编译了BCrypt;但SCrypt返回此错误: >setup.py安装 正在运行的安装 运行构建 运行build_ext 建筑“scrypt”扩建 C:\程序文件(x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe/c/nologo/Ox/MD/W3/GS-/DNDEBUG-DHAVE\u CONFI

我的机器上似乎没有安装Scrypt。我已经安装了Windows版本。我使用Visual Studio免费版,安装了OpenSSL 32位,并成功编译了BCrypt;但SCrypt返回此错误:

>setup.py安装
正在运行的安装
运行构建
运行build_ext
建筑“scrypt”扩建
C:\程序文件(x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe/c/nologo/Ox/MD/W3/GS-/DNDEBUG-DHAVE\u CONFIG\u H-Iscrypt-1.1.6-Iscrypt-1.1.6/lib-Iscrypt-1.1.6/lib-Iscrypt-1.1.6/lib/crypto-Iscrypt-1.1.1.6/util-Ic:\OpenSSL-Win32\include-Ic:\Python27\include-Ic:\Python27\PC/Tcsrc/scrypt2.2\src\emp.2\src发布
scrypt2.c
scrypt-1.1.6/lib\scryptenc/scryptenc.h(32):致命错误C1083:无法打开包含文件:“stdint.h”:没有此类文件或目录
错误:命令“C:\Program Files(x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe”失败,退出状态为2
退出代码:1
更新:复制了库,现在我收到另一个错误:

running install
running build
running build_ext
building 'scrypt' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DHAVE_CONFIG_H -Iscrypt-1.1.6 -Iscrypt-1.1.6/lib -Iscrypt-1.1.6/lib/scryptenc -Iscrypt-1.1.6/lib/crypto -Iscrypt-1.1.6/lib/util -Ic:\OpenSSL-Win32\include -IC:\Python27\include -IC:\Python27\PC /Tcsrc/scrypt2.c /Fobuild\temp.win-amd64-2.7\Release\src/scrypt2.obj
scrypt2.c
src/scrypt2.c(72) : warning C4244: '=' : conversion from 'Py_ssize_t' to 'int',possible loss of data
src/scrypt2.c(73) : warning C4244: '=' : conversion from 'Py_ssize_t' to 'int', possible loss of data
src/scrypt2.c(87) : error C2143: syntax error : missing ';' before 'type'
src/scrypt2.c(92) : error C2065: 'value' : undeclared identifier
src/scrypt2.c(92) : warning C4047: '=' : 'int' differs in levels of indirection from 'PyObject *'
src/scrypt2.c(96) : error C2065: 'value' : undeclared identifier
src/scrypt2.c(96) : warning C4047: 'return' : 'PyObject *' differs in levels of indirection from 'int'
src/scrypt2.c(99) : error C2143: syntax error : missing '{' before '*'
src/scrypt2.c(132) : error C2143: syntax error : missing ';' before 'type'
src/scrypt2.c(136) : error C2065: 'value' : undeclared identifier
src/scrypt2.c(136) : warning C4047: '=' : 'int' differs in levels of indirection from 'PyObject *'
src/scrypt2.c(139) : error C2065: 'value' : undeclared identifier
src/scrypt2.c(139) : warning C4047: 'return' : 'int *' differs in levels of indirection from 'int'
src/scrypt2.c(142) : error C2061: syntax error : identifier 'ScryptMethods'
src/scrypt2.c(142) : error C2059: syntax error : ';'
src/scrypt2.c(142) : error C3409: empty attribute block is not allowed
src/scrypt2.c(142) : error C2513: '/*global*/ ' : no variable declared before '='
src/scrypt2.c(151) : error C2065: 'ScryptMethods' : undeclared identifier
src/scrypt2.c(151) : warning C4047: 'function' : 'PyMethodDef *' differs in levels of indirection from 'int'
src/scrypt2.c(151) : warning C4024: 'Py_InitModule4_64' : different types for formal and actual parameter 2
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe"' failed with exit status 2
Update2:不想使用GCC编译:

>setup.py build -c mingw32
running build
running build_ext
building 'scrypt' extension
C:\MinGW64\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DHAVE_CONFIG_H -Iscrypt-1.1.6 - Iscrypt-1.1.6/lib -Iscrypt-1.1.6/lib/scryptenc -Iscrypt-1.1.6/lib/crypto -Iscrypt-1.1.6/lib/util -Ic:\OpenSSL-Win32\include -IC:\Python27\include -IC:\Python27\PC -c  src/scrypt2.c -o build\temp.win-amd64-2.7\Release\src\scrypt2.o
gcc: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
而且在
gcc--help中没有
-mno cygwin

编辑n:

>setup.py build -c mingw32
running build
running build_ext
building 'scrypt' extension
C:\MinGW64\bin\gcc.exe -mdll -O -Wall -DHAVE_CONFIG_H -Iscrypt-1.1.6 -Iscrypt-1.1.6/lib -Iscrypt-1.1.6/lib/scryptenc -Iscrypt-1.1.6/lib/crypto -Iscrypt-1.1.6/lib/util -Ic:\OpenSSL-Win32\include -IC:\Python27\include -IC:\Python27\PC -c src/scrypt2.c -o  build\temp.win-amd64-2.7\Release\src\scrypt2.o
C:\MinGW64\bin\gcc.exe -mdll -O -Wall -DHAVE_CONFIG_H -Iscrypt-1.1.6 -Iscrypt-1.1.6/lib  -Iscrypt-1.1.6/lib/scryptenc -Iscrypt-1.1.6/lib/crypto -Iscrypt-1.1.6/lib/util -Ic:\OpenSSL-Win32\include -IC:\Python27\include -IC:\Python27\PC -c scrypt- 1.1.6/lib/crypto/crypto_aesctr.c -o build\temp.win-amd64-2.7\Release\scrypt- 1.1.6\lib\crypto\crypto_aesctr.o
In file included from scrypt-1.1.6/lib/crypto/crypto_aesctr.c:34:0:
c:\OpenSSL-Win32\include/openssl/aes.h:1:1: error: expected identifier or '(' before  '.' token
In file included from scrypt-1.1.6/lib/crypto/crypto_aesctr.h:34:0,
from scrypt-1.1.6/lib/crypto/crypto_aesctr.c:38:
c:\OpenSSL-Win32\include/openssl/aes.h:1:1: error: expected identifier or '(' before '.' token
In file included from scrypt-1.1.6/lib/crypto/crypto_aesctr.c:38:0:
scrypt-1.1.6/lib/crypto/crypto_aesctr.h:51:5: warning: 'struct crypto_aesctr' declared   inside parameter list [enabled by default]
scrypt-1.1.6/lib/crypto/crypto_aesctr.h:51:5: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
scrypt-1.1.6/lib/crypto/crypto_aesctr.h:57:32: warning: 'struct crypto_aesctr' declared inside parameter list [enabled by default]
scrypt-1.1.6/lib/crypto/crypto_aesctr.c:41:2: error: unknown type name 'AES_KEY'
scrypt-1.1.6/lib/crypto/crypto_aesctr.c:54:20: error: unknown type name 'AES_KEY'
scrypt-1.1.6/lib/crypto/crypto_aesctr.c:82:1: error: conflicting types for 'crypto_aesctr_stream'
In file included from scrypt-1.1.6/lib/crypto/crypto_aesctr.c:38:0:

scrypt-1.1.6/lib/crypto/crypto_aesctr.h:50:6: note: previous declaration of 'crypto_aesctr_stream' was here
scrypt-1.1.6/lib/crypto/crypto_aesctr.c: In function 'crypto_aesctr_stream':
scrypt-1.1.6/lib/crypto/crypto_aesctr.c:97:4: warning: implicit declaration of function    'AES_encrypt' [-Wimplicit-function-declaration]
scrypt-1.1.6/lib/crypto/crypto_aesctr.c: At top level:
scrypt-1.1.6/lib/crypto/crypto_aesctr.c:113:1: error: conflicting types for  'crypto_aesctr_free'
In file included from scrypt-1.1.6/lib/crypto/crypto_aesctr.c:38:0:
scrypt-1.1.6/lib/crypto/crypto_aesctr.h:57:6: note: previous declaration of 'crypto_aesctr_free' was here
error: command 'gcc' failed with exit status 1

stdint.h
是C99的一部分。Microsoft的C编译器不支持C99。您可能需要使用另一个类似或类似的编译器。

我将尝试msinttypes,因为MinGw很难在中安装offline@AbdelouahabPp:不幸的是,我看不出是什么导致了您所得到的错误。我唯一的想法就是试试MinGW。抱歉。谢谢,我将尝试在脱机模式下安装MinGw,并查看:)在安装MinGw后,我仍然有错误!我已经更新了这个问题。@Abdelouahapp:看。我建议使用后一种方法(编辑
cygwincompiler.py
并删除
-mno cygwin
)。