在Windows上安装django-cms

时间:2013-04-05 20:08:46

标签: python django django-cms

根据找到的说明here在Windows机器上运行pip install django===1.4 django-cms south会返回此错误:

Downloading/unpacking Django==1.4
  Downloading Django-1.4.tar.gz (7.6MB): 7.6MB downloaded
  Running setup.py egg_info for package Django

Downloading/unpacking django-cms
  Running setup.py egg_info for package django-cms
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "c:\users\shadow\appdata\local\temp\pip-build-Shadow\django-cms\setup
.py", line 3, in <module>
        import cms
      File "cms\__init__.py", line 7, in <module>
        if 'cms' in settings.INSTALLED_APPS:
      File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 53, in
__getattr__
        self._setup(name)
      File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 46, in
_setup
        % (desc, ENVIRONMENT_VARIABLE))
    django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APP
S, but settings are not configured. You must either define the environment varia
ble DJANGO_SETTINGS_MODULE or call settings.configure() before accessing setting
s.
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "c:\users\shadow\appdata\local\temp\pip-build-Shadow\django-cms\setup.py"
, line 3, in <module>

    import cms

  File "cms\__init__.py", line 7, in <module>

    if 'cms' in settings.INSTALLED_APPS:

  File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 53, in __ge
tattr__

    self._setup(name)

  File "C:\Python27\lib\site-packages\django\conf\__init__.py", line 46, in _set
up

    % (desc, ENVIRONMENT_VARIABLE))

django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, b
ut settings are not configured. You must either define the environment variable
DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

----------------------------------------
Command python setup.py egg_info failed with error code 1 in c:\users\shadow\app
data\local\temp\pip-build-Shadow\django-cms
Storing complete log in C:\Users\Shadow\pip\pip.log

Django和apache以及其他一切正常运行。据我所知,这种错误只会发生在您实际尝试运行django而不是尝试安装插件/应用程序时。 有关导致此错误的原因的任何想法?

1 个答案:

答案 0 :(得分:1)

这是一个已知问题,将在接下来的3天内以2.3.6版本修复。即将推出的2.4版本也不会出现这个问题。