我想在Ubuntu上安裝Django。我正在通過以下安裝教程:http://jeffbaier.com/articles/installing-django-on-an-ubuntu-linux-server/初學者django設置:無法導入設置'myproject.settings'
當我嘗試執行'syncdb'步驟時出現錯誤。這看起來像是一個環境問題。我該如何解決?
[email protected]:~/django_projects/myproject$ django-admin.py syncdb
Traceback (most recent call last):
File "/usr/local/bin/django-admin.py", line 5, in <module>
management.execute_from_command_line()
File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 433, in execute_from_command_line
utility.execute()
...
File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 92, in __init__
raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'myproject.settings' (Is it on sys.path?): No module named myproject.settings
[email protected]:~/django_projects/myproject$
太容易了......謝謝! – codingJoe