ImportError: No module named crispy_forms

[edited by admin: formatting]

Traceback (most recent call last):

  File "./", line 10, in <module>execute_from_command_line(sys.argv)

  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 364, in execute_from_command_line

  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 338, in execute

  File "/usr/local/lib/python2.7/dist-packages/django/", line 27, in setup

  File "/usr/local/lib/python2.7/dist-packages/django/apps/", line 85, in populate
    app_config = AppConfig.create(entry)

  File "/usr/local/lib/python2.7/dist-packages/django/apps/", line 94, in create
    module = import_module(entry)

  File "/usr/lib/python2.7/importlib/", line 37, in import_module

ImportError: No module named crispy_forms

I have tried everything to get this to work. I have reloaded the web app.

I have also tried installing both inside and outside the virtual environment using the easy install and the pip install and the pip3 install.

Don't really know what to do next. Your help is appreciated.

So judging from the traceback, you would need to "pip2.7 install --user". What happens when you do that install?

Hi i don't know why the traceback is saying that the python version is 2.7.

I ran this....

$ mkvirtualenv --python=/usr/bin/python3.7 mysite-virtualenv

and it said something about depreciated f(l)avor.

However when I checked the interpreter it said the version was 3.7.

Why does it say python 2.7 and how do i fix that?

seems like after you fixed the python version and set up your webapp to use your virtualenv correctly (from the webapp tabs settings), and reloaded your webapp, your website is now working?

Yes but I still cant use migrate it still comes out with a ImportError: No module named crispy_forms

does this have something to do with the python 2.7?

Hi when trying to create the 3.7 environment this is whats happening

CRHerna@glenn-liveconsole7:~$ mkvirtualenv --python=/usr/bin/python3.7 mysite-virtualenv

Running virtualenv with interpreter /usr/bin/python3.7

Using base prefix '/usr'

/usr/local/lib/python2.7/dist-packages/ DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

import imp

New python executable in /home/CRHerna/.virtualenvs/mysite-virtualenv/bin/python3.7

Also creating executable in /home/CRHerna/.virtualenvs/mysite-virtualenv/bin/python

Installing setuptools, pip, wheel...

Why is it looking in python2.7?

can you give the exact commands from when you made the virtualenv to when you ran the code? Where is this error traceback that you are seeing? Is it from the webapp error logs? Or from the console? Or from running code from the file editor?

hey did anyone ever find the answer to his problem? i am facing the same issue

did you follow the solutions suggested?

I was able to solve this by going to my pythonanywhere account > Web > scroll down to Code > Python Version.

My python version was 3.8. So i went to bash and ran pip3.8 install django-crispy-forms --user

then I reloaded my website and refreshed my website and it worked.

I'm too stupid to understand how to use the virtual environment part. It kept saying stuff about my python version is 3.7 when it should be 3.8 so I just gave up and deleted my virtual environment.

Hi @alisayt -- how did you create the virtualenv?