简体   繁体   English

python manage.py runserver-错误:没有名为注册的模块

[英]python manage.py runserver - Error: no module named registration

I am attempting to run python manage.py runserver to start the development server and I receive the following error: 我试图运行python manage.py runserver来启动开发服务器,但收到以下错误:

Error: no module named registration

In my common.py file I have under installed apps "registration". 在我的common.py文件中,我已安装了“注册”应用程序。

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'rosetta',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'templatetag_handlebars',
'registration',
'appName.common',
'appName.users',
'appName.core',

)

I think this may be the culprit, but cannot be sure. 我认为这可能是罪魁祸首,但不能确定。

Can anyone tell me what I have done and how to fix it? 谁能告诉我我做了什么以及如何解决?

Thanks. 谢谢。

Open python shell and do this: 打开python shell并执行以下操作:

import sys

sys.path.append('/your_registration_package_path')

you might forgot add registration package to your python sys path 您可能会忘记将registration包添加到python sys path

import sys
sys.path.append('/your_path')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM