[英]Django server error: ImportError: No module named dal
I'm working with a Django server not coded by me.我正在使用不是我编码的 Django 服务器。 I have already installed all dependencies using
pip install -r requirements
, but when I'm trying to execute manage.py
I get this error.我已经使用
pip install -r requirements
安装了所有依赖项,但是当我尝试执行manage.py
此错误。
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named dal
The solution should be something like pip install dal
, but when I try it, I get another error: there is no dal
module.解决方案应该类似于
pip install dal
,但是当我尝试它时,出现另一个错误:没有dal
模块。
I'm using Python 2.7 and Django 1.9.8我使用的是 Python 2.7 和 Django 1.9.8
UPDATE更新
My current INSTALLED_APPS我当前的 INSTALLED_APPS
INSTALLED_APPS = (
#'dal',
#'dal_select2',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
'django_extensions',
'rosetta',
'corsheaders',
'rest_framework',
'rest_framework.authtoken',
'geoposition',
'cities',
'core',
'api',
'dal',
'dal_select2'
)
问题是您正在尝试使用pip install dal
安装 django 自动完成灯,但您应该通过键入pip install django-autocomplete-light
来安装它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.