Python Django 错误 ModuleNotFoundError:没有名为“corsheaders”的模块

Mic*_*ord 2 python django oauth python-3.x django-cors-headers

嘿伙计们,当我安装了 corsheaders 时,我收到以下错误消息,知道为什么我收到以下错误消息,因为我没有想法。

installed:
Python 3.7.2

certifi==2018.11.29

chardet==3.0.4

Django==2.1.7

django-cors-headers==2.4.0

django-mssql==1.8

django-oauth-toolkit==1.2.0

djangorestframework==3.9.1

idna==2.8

oauthlib==3.0.1

pytz==2018.9

requests==2.21.0

urllib3==1.24.1

(Oauth) C:\Users\michael.mountford\OneDrive\Programming\matt-mikes-practice\Oauth>Scripts\python.exe mysite\manage.py runserver
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x03AC8C48>
Traceback (most recent call last):
  File "C:\Users\michael.mountford\OneDrive\Programming\matt-mikes-practice\Oauth\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\michael.mountford\OneDrive\Programming\matt-mikes-practice\Oauth\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run
    autoreload.raise_last_exception()
  File "C:\Users\michael.mountford\OneDrive\Programming\matt-mikes-practice\Oauth\lib\site-packages\django\utils\autoreload.py", line 248, in raise_last_exception
    raise _exception[1]
  File "C:\Users\michael.mountford\OneDrive\Programming\matt-mikes-practice\Oauth\lib\site-packages\django\core\management\__init__.py", line 337, in execute
    autoreload.check_errors(django.setup)()
  File "C:\Users\michael.mountford\OneDrive\Programming\matt-mikes-practice\Oauth\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\michael.mountford\OneDrive\Programming\matt-mikes-practice\Oauth\lib\site-packages\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Users\michael.mountford\OneDrive\Programming\matt-mikes-practice\Oauth\lib\site-packages\django\apps\registry.py", line 89, in populate
    app_config = AppConfig.create(entry)
  File "C:\Users\michael.mountford\OneDrive\Programming\matt-mikes-practice\Oauth\lib\site-packages\django\apps\config.py", line 90, in create
    module = import_module(entry)
  File "C:\Users\michael.mountford\OneDrive\Programming\matt-mikes-practice\Oauth\lib\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 'corsheaders'
Run Code Online (Sandbox Code Playgroud)

Ami*_*yan 7

这也可能是在将其添加到 时,在末尾遗漏的情况。只需检查一次。corsheaders,INSTALLED_APPS