question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'django_extensions'

See original GitHub issue

i follow Setup for development , but after run docker show this error.

==> 08:51:30 ==> Collecting statics... 
==> 08:51:30 ==> Send via Slack info about service version and network
==> 08:51:30 ==> Running Gunicorn... 
[2022-08-18 08:51:30 +0000] [1] [INFO] Starting gunicorn 20.1.0
[2022-08-18 08:51:30 +0000] [1] [INFO] Listening at: unix:/nginx/gunicorn.socket,http://0.0.0.0:8888 (1)
[2022-08-18 08:51:30 +0000] [1] [INFO] Using worker: gevent
[2022-08-18 08:51:30 +0000] [13] [INFO] Booting worker with pid: 13
[2022-08-18 08:51:30 +0000] [13] [INFO] Making Psycopg2 Green
[2022-08-18 08:51:30 +0000] [13] [INFO] Made Psycopg2 Green
Traceback (most recent call last):
  File "/app/manage.py", line 30, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 420, in execute
    django.setup()
  File "/usr/local/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.10/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/usr/local/lib/python3.10/site-packages/django/apps/config.py", line 228, in create
    import_module(entry)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django_extensions'
[2022-08-18 08:51:31 +0000] [13] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/ggevent.py", line 146, in init_process
    super().init_process()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.10/site-packages/gunicorn/util.py", line 359, in import_app
    mod = importlib.import_module(module)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/app/config/wsgi.py", line 38, in <module>
    application = get_wsgi_application()
  File "/usr/local/lib/python3.10/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
    django.setup(set_prefix=False)
  File "/usr/local/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.10/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/usr/local/lib/python3.10/site-packages/django/apps/config.py", line 228, in create
    import_module(entry)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django_extensions'
[2022-08-18 08:51:31 +0000] [13] [INFO] Worker exiting (pid: 13)
[2022-08-18 08:51:31 +0000] [1] [INFO] Shutting down: Master
[2022-08-18 08:51:31 +0000] [1] [INFO] Reason: Worker failed to boot.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Uxio0commented, Aug 29, 2022

No, not at all. I think we should include django-extensions on requirements.txt, as the extensions are so useful even for our production environments

1reaction
benjamintshicommented, Aug 18, 2022

@moisses89 thank you so much. it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: No module named django_extensions
It looks as if your sample project relies on django-extensions. You can install it by activating your virtualenv, then running:
Read more >
ModuleNotFoundError: No module named 'django_extensions'
The Python "ModuleNotFoundError: No module named 'django_extensions'" occurs when we forget to install the django-extensions module before importing it or ...
Read more >
No module named 'django-extensions' on Django 3.x #1459
'django-extensions' ] When running: $ pipenv run python manage_django.py shell ... ModuleNotFoundError: No module named 'django_extensions' ...
Read more >
ImportError No module named django extensions - Edureka
I am completely new to python as well as to Django. I got a sample Django Rest project. When I run: python manage.py...
Read more >
Error: no module named django_extensions - Google Groups
I've installed django-extensions via Pip, and I'm receiving an error when I try to run any ./manage.py commands in my project.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found