I can import crispy_forms but when I runpython3 manage.py runserver
it say no module named crispy_forms, I can not why it is, because when Ipip3 list
, I can see django-crispy-forms.
so I attach my setup for interpreter, really need your help
interpreter setup imageand Error message in terminal
>>> python3 manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/Users/eunwoo/anaconda3/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/Users/eunwoo/anaconda3/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/Users/eunwoo/anaconda3/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/Users/eunwoo/anaconda3/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run autoreload.raise_last_exception() File "/Users/eunwoo/anaconda3/lib/python3.7/site-packages/django/utils/autoreload.py", line 77, in raise_last_exception raise _exception[1] File "/Users/eunwoo/anaconda3/lib/python3.7/site-packages/django/core/management/__init__.py", line 337, in execute autoreload.check_errors(django.setup)() File "/Users/eunwoo/anaconda3/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/Users/eunwoo/anaconda3/lib/python3.7/site-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/Users/eunwoo/anaconda3/lib/python3.7/site-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) File "/Users/eunwoo/anaconda3/lib/python3.7/site-packages/django/apps/config.py", line 90, in create module = import_module(entry) File "/Users/eunwoo/anaconda3/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'crispy_forms'
score:-1
pip install django-crispy-forms
score:-1
pip install django-crispy-forms not works for this error. You need to use python command instead python3 for run server.
score: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
score: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
Credit To: stackoverflow.com
Related Query
- ModuleNotFoundError - No module named 'main' when attempting to start service
- Widget tweaks error ModuleNotFoundError: No module named 'widget_tweaks' with Django forms
- ImportError Exception Value: No module named forms
- ModuleNotFoundError : no module named : crispy_forms
- Heroku: ModuleNotFoundError :No module named 'requests'
- pip install error: ModuleNotFoundError No module named 'setuptools'
- Django-material : from material.forms ImportError: No module named forms
- django error: ModuleNotFoundError No module named 'siteerrors'
- No module named pkg_resources
- No module named MySQLdb
- ImportError: No module named 'django.core.urlresolvers'
- django import error - No module named core.management
- Django Rest Framework -- no module named rest_framework
- Django - "no module named django.core.management"
- Error: No module named psycopg2.extensions
- django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb
- Django import error - no module named django.conf.urls.defaults
- Gunicorn, no module named 'myproject
- ImportError: No module named virtualenv
- django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg
- "No module named simple" error in Django
- Running django tutorial tests fail - No module named polls.tests
- ImportError: No module named django.core.wsgi Apache + VirtualEnv + AWS + WSGI
- ImportError: No module named django_filters
- No module named 'polls.apps.PollsConfigdjango'; Django project tutorial 2
- No module named django but it is installed
- ImportError: No module named django.core.handlers.wsgi in install django mod_wsgi config on apache
- Django: from django.urls import reverse; ImportError: No module named urls
- Import Error: No module named django
- Django Shell No module named settings
More Query from same tag
- django ORM queryset group by month, week, TruncMonth
- Django Cannot Update User Profile Picture
- Python Virtualenv not working since upgrading to OS X Mountain Lion
- N+1 queries in SerializerMethodField
- Django CKEditor toolbar settings
- Django objects.get_or_create(): passing arguments from dictionary or list
- Server side Framework vs Client side Frameworks
- pip install ignoring child directories on install with django project
- Redirecting django manage.py output (in windows) to a text file
- How to use a downloaded font in a django project instead of google fonts api
- ForeignKey(unique=True) is usually better served by a OneToOneField
- Django - global name error when authenticate with multiple database
- AttributeError: 'QuerySet' object has no attribute 'tags' when trying to save quotes and tags with ClusterableModel and ClusterTaggableManager
- Error in deploying django website on heroku
- The _imaging C module is not installed (on windows)