“ ModuleNotFoundError:没有名为'rest_auth'的模块”即使安装了rest_auth,也会出错吗?
完整错误日志:
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x000001D1C08458C8>
Traceback (most recent call last):
File "D:\Jeremy\Work\Coding\git\file_upload_restrict\env\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "D:\Jeremy\Work\Coding\git\file_upload_restrict\env\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "D:\Jeremy\Work\Coding\git\file_upload_restrict\env\lib\site-packages\django\utils\autoreload.py", line 248, in raise_last_exception
raise _exception[1]
File "D:\Jeremy\Work\Coding\git\file_upload_restrict\env\lib\site-packages\django\core\management\__init__.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "D:\Jeremy\Work\Coding\git\file_upload_restrict\env\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "D:\Jeremy\Work\Coding\git\file_upload_restrict\env\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "D:\Jeremy\Work\Coding\git\file_upload_restrict\env\lib\site-packages\django\apps\registry.py", line 89, in populate
app_config = AppConfig.create(entry)
File "D:\Jeremy\Work\Coding\git\file_upload_restrict\env\lib\site-packages\django\apps\config.py", line 90, in create
module = import_module(entry)
File "D:\Jeremy\Work\Coding\git\file_upload_restrict\env\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 'rest_auth'
我在INSTALLED_APPS中安装了带有pip的“ django-rest-auth”:
INSTALLED_APPS = [
'rest_framework',
'rest_framework.authtoken',
'rest_auth',
]
我的点冻结:
Django==2.1.4
django-appconf==1.0.2
django-cleanup==3.0.1
django-private-storage==2.1.3
django-rest-auth==0.9.3
djangorestframework==3.9.0
Pillow==5.3.0
pytz==2018.7
rcssmin==1.0.6
rjsmin==1.0.12
six==1.12.0
链接到gitlab.com中具有虚拟环境的完整代码