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 trial

Python Build a Social Network with Flask Making Strong Users Cryptographic Hashing with Flask-Bcrypt

`py-bcrypt`, `flask-bcrypt`, and possibly `bcrypt` all conflict with one another. Uninstall them all and...

...re-install only flask-bcrypt.

pip uninstall py-bcrypt && pip uninstall flask-bcrypt && pip uninstall bcrypt && pip install flask-bcrypt

This worked for me on Mojave. Who knows if uninstalling bcrypt will create problems for me down the road...

btw the error I was getting was AttributeError: module 'bcrypt._bcrypt' has no attribute 'ffi'

Would also like to add I'm using a venv with Python 3.7

$ pip freeze
bcrypt==3.1.7
cffi==1.13.2
Click==7.0
Flask==1.1.1
Flask-Bcrypt==0.7.1
Flask-Login==0.4.1
itsdangerous==1.1.0
Jinja2==2.10.3
MarkupSafe==1.1.1
peewee==3.13.1
pycparser==2.19
six==1.13.0
Werkzeug==0.16.0

1 Answer

Answer above