Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Gene Higgins
Gene Higgins
16,580 Points

`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...

Gene Higgins
Gene Higgins
16,580 Points

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

Gene Higgins
Gene Higgins
16,580 Points

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