尝试在Windows上安装Python bcrypt的许多问题(x64)

Kiw*_*iwi 5 python windows windows-7 windows64

这个问题已在其他地方提到,但它没有提供可行的解决方案,所以我仍然希望打开一张票.

c:\Users\me\Desktop\temp\py-bcrypt-0.2>setup.py install build --compiler=min
gw32
running install
running build
running build_py
running build_ext
building 'bcrypt._bcrypt' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\include -IC:\Python27\PC -c bcrypt/bcrypt_python.c -o build\temp.win32-2.7\Release\bcrypt\bcrypt_python.o
bcrypt/bcrypt_python.c:29:26: error: expected declaration specifiers or '...' before 'u_int8_t'
bcrypt/bcrypt_python.c:29:38: error: expected declaration specifiers or '...' before 'u_int16_t'
bcrypt/bcrypt_python.c:29:49: error: expected declaration specifiers or '...' before 'u_int8_t'
bcrypt/bcrypt_python.c: In function 'bcrypt_encode_salt':
bcrypt/bcrypt_python.c:56:2: error: too many arguments to function 'encode_salt'

bcrypt/bcrypt_python.c:29:6: note: declared here
error: command 'gcc' failed with exit status 1

这是在摆脱了最初的"错误:安装脚本退出并出现错误:无法找到vcvarsall.bat"之后,我留下了似乎是一个戈迪奇结.pip并且easy-install不工作.我还阅读了其他一些文章.

我现在不需要实现bcrypt,所以这不是一个紧急事项,但显然,实施安全密码保护至关重要.

she*_*pya 0

假设您使用的是 mingw64,您应该将 ifdefs 上的 _WIN32 中的 _MSC_VER 更改为 bcrypt.c、bcrypt_python.c 和 pybc_blf.h

(我也回答过另一个问题了)