ModuleNotFoundError: No module named 'corsheaders'解决

 解决办法:

 pip install django-cors-headers

ModuleNotFoundError: No module named 'corsheaders'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/.virtualenvs/XXX/lib/python3.7/site-packages/django/utils/autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "/root/.virtualenvs/XXX/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 137, in inner_run
    handler = self.get_handler(*args, **options)
  File "/root/.virtualenvs/XXX/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/runserver.py", line 27, in get_handler
    handler = super().get_handler(*args, **options)
  File "/root/.virtualenvs/XXX/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 64, in get_handler
    return get_internal_wsgi_application()
  File "/root/.virtualenvs/xxx/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 50, in get_internal_wsgi_application
    ) from err
django.core.exceptions.ImproperlyConfigured: WSGI application 'project.wsgi.application' could not be loaded; Error importing module.

你可能感兴趣的:(ERRO坑,django,wsgi,appliction)