简体   繁体   English

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

[英]A multitude of problems trying to install Python bcrypt on Windows (x64)

This problem has been mentioned elsewhere , but it does not provide a working solution, so I would still like to keep a ticket open. 这个问题已在其他地方提到,但它没有提供可行的解决方案,所以我仍然希望打开一张票。

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

This is after getting rid of the initial “error: Setup script exited with error: Unable to find vcvarsall.bat” , I am left with what seems like a Gordic knot. 这是在摆脱了最初的“错误:安装脚本退出并出现错误:无法找到vcvarsall.bat”之后 ,我留下了似乎是一个戈迪奇结。 pip and easy-install do not work. pip easy-install不起作用。 I have also read a number of other articles. 我还阅读了其他一些文章。

I don't need to implement bcrypt at the moment, so it is not an urgent matter, but obviously, implementing a secure password protection is vital. 我现在不需要实现bcrypt,所以这不是一个紧急事项,但显然,实施安全密码保护至关重要。

The simplest way I found was to download and install windows binaries, rather than trying to compile myself. 我找到的最简单的方法是下载并安装Windows二进制文件,而不是尝试编译自己。 This guy has some on bitbucket 这家伙有一些关于bitbucket

supposing you are using mingw64, you should change _MSC_VER in _WIN32 on ifdefs into bcrypt.c, bcrypt_python.c and pybc_blf.h 假设您正在使用mingw64,您应该将ifdefs上的_WIN32中的_MSC_VER更改为bcrypt.c,bcrypt_python.c和pybc_blf.h

(I've also replied the other question) (我也回答了另一个问题)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM