maxcountryman / flask-bcrypt

Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Home Page:http://readthedocs.org/docs/flask-bcrypt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install in windows 7 x64

alexwaters opened this issue · comments

I am trying to install this package in windows 7 x64 with the following setup:

python 2.7.3 x86
visual studio 9.0 (2010 express) - has x86 c compiler
setuptools
pip

I try pip install flask-bcrypt or easy_install flask-bcrypt and keep getting the same errors:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tcbcrypt/bcrypt_py
thon.c /Fobuild\temp.win32-2.7\Release\bcrypt/bcrypt_python.obj

bcrypt_python.c

bcrypt/bcrypt_python.c(56) : warning C4244: 'function' : conversion from 'long'
to 'u_int8_t', possible loss of data

bcrypt/bcrypt_python.c(76) : error C2143: syntax error : missing ';' before 'typ
e'

bcrypt/bcrypt_python.c(77) : error C2143: syntax error : missing ';' before 'typ
e'

bcrypt/bcrypt_python.c(80) : error C2065: 'password_copy' : undeclared identifie
r

bcrypt/bcrypt_python.c(80) : warning C4047: 'function' : 'const char *' differs
in levels of indirection from 'int'

bcrypt/bcrypt_python.c(80) : warning C4024: 'pybc_bcrypt' : different types for
formal and actual parameter 1

bcrypt/bcrypt_python.c(80) : error C2065: 'salt_copy' : undeclared identifier

bcrypt/bcrypt_python.c(80) : warning C4047: 'function' : 'const char *' differs
in levels of indirection from 'int'

bcrypt/bcrypt_python.c(80) : warning C4024: 'pybc_bcrypt' : different types for
formal and actual parameter 2

bcrypt/bcrypt_python.c(83) : error C2065: 'password_copy' : undeclared identifie
r

bcrypt/bcrypt_python.c(83) : warning C4022: 'free' : pointer mismatch for actual
parameter 1

bcrypt/bcrypt_python.c(84) : error C2065: 'salt_copy' : undeclared identifier

bcrypt/bcrypt_python.c(84) : warning C4022: 'free' : pointer mismatch for actual
parameter 1

bcrypt/bcrypt_python.c(94) : error C2061: syntax error : identifier 'bcrypt_meth
ods'

bcrypt/bcrypt_python.c(94) : error C2059: syntax error : ';'

bcrypt/bcrypt_python.c(94) : error C3409: empty attribute block is not allowed

bcrypt/bcrypt_python.c(94) : error C2513: '/global/ ' : no variable declared b
efore '='

bcrypt/bcrypt_python.c(109) : error C2065: 'bcrypt_methods' : undeclared identif
ier

bcrypt/bcrypt_python.c(109) : warning C4047: 'function' : 'PyMethodDef *' differ
s in levels of indirection from 'int'

bcrypt/bcrypt_python.c(109) : warning C4024: 'Py_InitModule4' : different types
for formal and actual parameter 2

error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.ex
e"' failed with exit status 2

Hi,

I'll need to look into this more. Offhand, are you able to install the Python BCrypt wrapper independently?

I don't know what you mean independently. I can install it without issue on Debian squeeze and Ubuntu 12.04. I think it's likely a problem with the c compiler. I tried it with GCC as well and met the same issue.

So are you unable to install py-bcrypt?

Collecting Flask-Bcrypt
Using cached Flask-Bcrypt-0.6.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): Flask in c:\python34\lib\site-packages (from Flask-Bcrypt)
Collecting py-bcrypt (from Flask-Bcrypt)
Using cached py-bcrypt-0.4.tar.gz
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in c:\python34\lib\site-packages (from Flask->Flask-Bcrypt)
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in c:\python34\lib\site-packages (from Flask->Flask-Bcrypt)
Requirement already satisfied (use --upgrade to upgrade): itsdangerous>=0.21 in c:\python34\lib\site-packages (from Flask->Flask-Bcrypt)
Requirement already satisfied (use --upgrade to upgrade): markupsafe in c:\python34\lib\site-packages (from Jinja2>=2.4->Flask->Flask-Bcrypt)
Installing collected packages: py-bcrypt, Flask-Bcrypt
Running setup.py install for py-bcrypt
building 'bcrypt._bcrypt' extension
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt.obj
bcrypt.c
bcrypt/bcrypt.c(139) : warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(363) : see declaration of '_snprintf'
bcrypt/bcrypt.c(249) : warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(363) : see declaration of '_snprintf'
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt_pbkdf.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt_pbkdf.obj
bcrypt_pbkdf.c
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt_python.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt_python.obj
bcrypt_python.c
bcrypt/bcrypt_python.c(63) : warning C4244: 'function' : conversion from 'long' to 'u_int8_t', possible loss of data
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/blowfish.c /Fobuild\temp.win32-3.4\Release\bcrypt/blowfish.obj
blowfish.c
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2146: syntax error : missing ')' before identifier 'passlen'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2081: 'size_t' : name in formal parameter list illegal
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2061: syntax error : identifier 'passlen'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2059: syntax error : ';'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2059: syntax error : ','
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(88) : error C2059: syntax error : ')'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2146: syntax error : missing ')' before identifier 'n'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2081: 'size_t' : name in formal parameter list illegal
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2061: syntax error : identifier 'n'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2059: syntax error : ';'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2059: syntax error : ')'
error: command 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe' failed with exit status 2
Complete output from command C:\Python34\python.exe -c "import setuptools, tokenize;file='C:\Users\bbarthelet\AppData\Local\Temp\pycharm-packaging0.tmp\py-bcrypt\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record C:\Users\BBARTH~1\AppData\Local\Temp\pip-tb3a4om2-record\install-record.txt --single-version-externally-managed --compile:
running install

running build

running build_py

creating build

creating build\lib.win32-3.4

creating build\lib.win32-3.4\bcrypt

copying bcrypt\__init__.py -> build\lib.win32-3.4\bcrypt

running build_ext

building 'bcrypt._bcrypt' extension

creating build\temp.win32-3.4

creating build\temp.win32-3.4\Release

creating build\temp.win32-3.4\Release\bcrypt

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt.obj

bcrypt.c

bcrypt/bcrypt.c(139) : warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

        c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(363) : see declaration of '_snprintf'

bcrypt/bcrypt.c(249) : warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

        c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(363) : see declaration of '_snprintf'

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt_pbkdf.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt_pbkdf.obj

bcrypt_pbkdf.c

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt_python.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt_python.obj

bcrypt_python.c

bcrypt/bcrypt_python.c(63) : warning C4244: 'function' : conversion from 'long' to 'u_int8_t', possible loss of data

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/blowfish.c /Fobuild\temp.win32-3.4\Release\bcrypt/blowfish.obj

blowfish.c

c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2146: syntax error : missing ')' before identifier 'passlen'

c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2081: 'size_t' : name in formal parameter list illegal

c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2061: syntax error : identifier 'passlen'

c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2059: syntax error : ';'

c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2059: syntax error : ','

c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(88) : error C2059: syntax error : ')'

c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2146: syntax error : missing ')' before identifier 'n'

c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2081: 'size_t' : name in formal parameter list illegal

c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2061: syntax error : identifier 'n'

c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2059: syntax error : ';'

c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2059: syntax error : ')'

error: command 'c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2

----------------------------------------
Command "C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\bbarthelet\\AppData\\Local\\Temp\\pycharm-packaging0.tmp\\py-bcrypt\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\BBARTH~1\AppData\Local\Temp\pip-tb3a4om2-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\bbarthelet\AppData\Local\Temp\pycharm-packaging0.tmp\py-bcrypt

exact same error trying to compile py-bcrypt
however python-bcrypt (https://github.com/DisruptiveLabs/python-bcrypt) compiles well if that serves