PythonAnywhere Forums

bcrypt vs py-bcrypt -- not the same!

Here's a story from a user that managed to debug a very baffling issue:

Basically there are two python packages that provide bcrypt functionality, bcrypt and py-bcrypt, and they are not compatible, but confusingly they both provide a module with the same name, "bcrypt", so "import bcrypt" works for either, which can cause confusion.

Moral of the story is: always use a virtualenv and be clear on exactly what packages you are using, both on your own machine and on pythonanywhere...

Thanks for sharing, @ReckoningReckoner :)