[Django]-ModuleNotFoundError : no module named : crispy_forms

0πŸ‘

I had the same error. I had to put "crispy_forms" in double-quotes as @erdin-eray said, and then try to re-import with pip install django-crispy-forms. This solved it for me.

It turns out the first time I did a pip install ... I was not in my (env) virtual environment!

pip freeze > requirements.txt:

asgiref==3.3.1
Django==3.1.3
django-crispy-forms==1.10.0
pkg-resources==0.0.0
pytz==2020.4
sqlparse==0.4.1
πŸ‘€bc1984adam

0πŸ‘

If you are using pipenv and creating virtual environments for your projects, you might need to be in your virtual environment’s shell. Try using

python3 -m pipenv shell

to start a shell of your virtual environment. You can check to make sure that django-crispy-forms are installed by using the

pip list

command. If you see the desired version of django-crispy-forms installed on this list, then try running the server again using the same command you were using initially:

python3 manage.py runserver
πŸ‘€kidbilly

0πŸ‘

I have found that my settings.py is very sensitive to the type of quote marks used.

When I consistently use single quote there is no problem.

Or if I consistantly use the double quote there is also no problem.

But when I tried to use both, I got your error with crispy_forms and crispy_bootstrap5 in the INSTALLED_APPS list.

πŸ‘€Charles Knell

-1πŸ‘

pip install django-crispy-forms
πŸ‘€vikas chouhan

-1πŸ‘

pip install django-crispy-forms not works for this error. You need to use python command instead python3 for run server.

πŸ‘€Tolga Yavuzer

Leave a comment