简体   繁体   English

python manage.py runserver找不到temba设置文件

[英]python manage.py runserver is not finding temba settings file

I'm a python, temba noob, so please be patient. 我是python,temba noob,所以请耐心等待。 I've found other posts similar to this, but none have resolved my issue. 我发现其他与此类似的帖子,但是都没有解决我的问题。

I'm installing Rapidpro on Ubuntu 15.04. 我正在Ubuntu 15.04上安装Rapidpro。 It requires django and temba. 它需要django和temba。

When I run python manage.py runserver I get: 当我运行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

I'm pretty sure my folder structure is good: 我很确定我的文件夹结构很好:

(env)osboxes@osboxes:~/dev/projects/rapidpro/rapidpro$ ls temba/settings.*
temba/settings.py  temba/settings.pyc  temba/settings.py.dev

And finally, here's my manage.py file: 最后,这是我的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)

I'm running manage.py from its folder. 我正在从其文件夹中运行manage.py。 This is driving me crazy (crazier?). 这让我发疯(疯子?)。

Any ideas? 有任何想法吗? TIA! TIA!

You didn't read to the end of the traceback. 您还没有读到追溯的末尾。 It's not having trouble finding the settings file; 查找设置文件没有问题; it is trying to load a dependency, pytz, which you have not installed. 它正在尝试加载尚未安装的依赖项pytz。

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

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