PY-bcrypt安装在Win 7 64位蟒蛇 [英] py-bcrypt installing on win 7 64bit python
问题描述
试图在WIN7安装PY-bcrypt。 Python是64位。第一个错误无法找到vcvarsall.bat。用Google搜索了一下才知道我需要安装MinGW的。现在这个安装了
Trying to install py-bcrypt on win7. Python is 64bit. First error unable to find vcvarsall.bat. Googled a bit learned that i needed to install mingw. installed it now this
C:\tools\python_modules\py-bcrypt-0.2>python setup.py build -c mingw32
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 b
d\temp.win-amd64-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
不知道下一步怎么办。想我就不会使用bcrypt和尝试别的东西。任何其他建议?
no idea what to do next. guess i'll just not use bcrypt and try something else. Any other suggestions?
推荐答案
我有同样的问题,我通过应用在此链接找到该补丁修复它:
I had the same issue and I fixed it by applying the patch found at this link:
<一个href=\"http://$c$c.google.com/p/py-bcrypt/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=1\" rel=\"nofollow\">http://$c$c.google.com/p/py-bcrypt/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=1
PY-bcrypt_11.patch
py-bcrypt_11.patch
必须手动应用它。
从该线程,问题的来源是
From that thread, the source of the problem is
根据 http://groups.google.com/group/mpir-的devel /味精/ 2c2d4cc7ec12adbb (下各种定义的标志窗口OS'es,cygwins,MinGW的的和其他的),它能够更好地使用_WIN32代替_MSC_VER,从bzero变化一起来memset的这两种编译MSVC下的mingw32和
According to http://groups.google.com/group/mpir-devel/msg/2c2d4cc7ec12adbb (flags defined under the various windows OS'es ,cygwins,mingw's and other's) its better to use _WIN32 instead of _MSC_VER, Together with the change from bzero to memset this compiles both under MSVC and MingW32.
希望帮助!
这篇关于PY-bcrypt安装在Win 7 64位蟒蛇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!