我是一个蟒蛇,temba noob,所以请耐心等待。我发现其他类似的帖子,但没有一个解决了我的问题。
我在Ubuntu 15.04上安装Rapidpro。它需要django和temba。
当我运行python manage.py runserver
时,我得到:
Traceback (most recent call last):
File "manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "/home/osboxes/dev/projects/rapidpro/rapidpro/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/home/osboxes/dev/projects/rapidpro/rapidpro/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
settings.INSTALLED_APPS
File "/home/osboxes/dev/projects/rapidpro/rapidpro/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 46, in __getattr__
self._setup(name)
File "/home/osboxes/dev/projects/rapidpro/rapidpro/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup
self._wrapped = Settings(settings_module)
File "/home/osboxes/dev/projects/rapidpro/rapidpro/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 98, in __init__
% (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'temba.settings' (Is it on sys.path? Is there an import error in the settings file?): Could not import settings 'temba.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named pytz
我非常确定我的文件夹结构很好:
(env)osboxes@osboxes:~/dev/projects/rapidpro/rapidpro$ ls temba/settings.*
temba/settings.py temba/settings.pyc temba/settings.py.dev
最后,这是我的manage.py文件:
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "temba.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
我正在从其文件夹运行manage.py.这让我发疯了(疯狂?)。
有什么想法吗? TIA!
答案 0 :(得分:1)
你没有读到回溯的结尾。它没有找到设置文件;它正在尝试加载你尚未安装的依赖项pytz。