无法 运行 django-admin startproject mysite (ubuntu, django.core.exceptions.ImproperlyConfigured)

Can't run django-admin startproject mysite (ubuntu, django.core.exceptions.ImproperlyConfigured)

当我尝试 运行 "django-admin startproject mysite" 时出现错误:

django-admin startprojekt mysite

Traceback (most recent call last):
  File "/usr/local/bin/django-admin", line 11, in <module>
    sys.exit(execute_from_command_line())
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 182, in fetch_command
    settings.INSTALLED_APPS
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 42, in _setup
    % (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

这是 Ubuntu 15.04 的全新安装。

我默认安装了 python 2 和 3:

python:

Python 2.7.9 (default, Apr  2 2015, 15:33:21) 


python3:

Python 3.4.3 (default, Mar 26 2015, 22:03:40) 

我已经通过 pip 安装了 django (sudo pip install Django)。

Django 似乎已安装:

python -c "import django; print(django.get_version())"
1.8.2

python3 -c "import django; print(django.get_version())"
1.7.6

有什么问题吗?

您将 startproject 拼错为 startprojekt。尝试:

django-admin startproject mysite