你好我在运行项目时正在做一个django(python)项目我收到了这个错误。我不知道错误是什么以及如何解决。
C:\Users\SujanRajs\Desktop\YAAS-master\YAAS-master\usatyal\YAAS>python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django-1.8.4- py2.7.egg\django\core\management\__init__.py", line 338, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\core\management\__init__.py", line 303, in execute
settings.INSTALLED_APPS
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\conf\__init__.py", line 48, in __getattr__
self._setup(name)
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\conf\__init__.py", line 44, in _setup
self._wrapped = Settings(settings_module)
File "C:\Python27\lib\site-packages\django-1.8.4-py2.7.egg\django\conf\__init__.py", line 92, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named YAAS.settings
答案 0 :(得分:0)
您应该在manage.py文件中正确指定设置路径。然后你的问题就会得到解决。
示例文件夹结构:
测试项目
test_project
__init__.py
settings.py
wsgi.py
manage.py
然后您的设置路径为test_project.settings