gpt4 book ai didi

python - 探戈与 Django ModuleNotFoundError : No module named 'registration'

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:55:56 25 4
gpt4 key购买 nike

我已经克隆了 this存储库作为教程的一部分并进入目录 tango_with_django_19/code/tango_with_django_project 运行命令:

$ python maange.py runserver

为了运行网络应用程序。但是,我收到以下错误:

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f6e2c1782f0>
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 113, in inner_run
autoreload.raise_last_exception()
File "/usr/lib/python3.6/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
six.reraise(*_exception)
File "/usr/lib/python3.6/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.6/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/lib/python3.6/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/usr/lib/python3.6/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'registration'

我正在使用 Manjaro Linux 并使用 pacman 安装了软件包 python-djangopython-django-extensions

如何解决此错误以便我可以运行网络应用程序?克隆上述 repo 后我没有改变。

最佳答案

您需要安装项目依赖。

在 tango_with_django_19/code 中运行 pip install -r requirements.txt 来安装它们。

然后迁移并运行服务器

关于python - 探戈与 Django ModuleNotFoundError : No module named 'registration' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42934657/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com