[英]A multitude of problems trying to install Python bcrypt on Windows (x64)
這個問題已在其他地方提到,但它沒有提供可行的解決方案,所以我仍然希望打開一張票。
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,所以這不是一個緊急事項,但顯然,實施安全密碼保護至關重要。
我找到的最簡單的方法是下載並安裝Windows二進制文件,而不是嘗試編譯自己。 這家伙有一些關於bitbucket
假設您正在使用mingw64,您應該將ifdefs上的_WIN32中的_MSC_VER更改為bcrypt.c,bcrypt_python.c和pybc_blf.h
(我也回答了另一個問題)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.