Error With Pip and flask-bcrypt

I am playing around with Flask and I wanted to use the Bcrypt tool to encrypt my users passwords. So like all the other packages I attempted:

pip install flask-bcrypt

That however resulted in this rather unpleasant error:

  error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

  ----------------------------------------
  Failed building wheel for python-bcrypt

That of course sent me on a dizzying hunt for resolution. I got it working by editing the “msvc9_support.py” file to not use the registry and use just the path where I found vcvarsall.bat on my computer:

   productdir = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" # Reg.get_value(key, "installdir")

Elegant? Eh probably not, Utility? perhaps. But it does work and after that I was able to install flask-bcrypt.

Leave a Reply