Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialOisin Kilkenny
14,213 PointsCan't install bcrypt
When I run pip install flask-bcrypt I get an error reading:
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
error: Unable to find vcvarsall.bat
---------------------------------------------------------------------
Cleaning up...
Command C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Use
rs\\Ushroom\\AppData\\Local\\Temp\\pip_build_Ushroom\\python-bcrypt\\setup.py';e
xec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n
'), __file__, 'exec'))" install --record C:\Users\Ushroom\AppData\Local\Temp\pip
-q_zxy66u-record\install-record.txt --single-version-externally-managed --compil
e failed with error code 1 in C:\Users\Ushroom\AppData\Local\Temp\pip_build_Ushr
oom\python-bcrypt
Storing debug log for failure in C:\Users\Ushroom\pip\pip.log
running build
It gives this same error when I try to run pip install py-bcrypt so I'm not sure what to do from there. :(
1 Answer
Matthew Carr
11,220 PointsI have to use windows at work, and found WinPython to be the easiest way for me to get difficult pip installs to work.
If neither of those options work, you might try either running linux, either natively or through a virtual machine. Or Cygwin. I think both have easy options to install the necessary build environment.
Yeeka Yau
7,410 PointsYeeka Yau
7,410 PointsThanks for this Matthew, I had the same issues with installing bcrypt on Windows7 - once I install WinPython I used the WinPython Command Prompt to install bcrypt using pip. It worked no problems at all. Hopefully this helps someone else who may come across the same issue.