If django already installed in current environemnt django cms cannot be installed #1651

Closed
ionelmc opened this Issue Mar 10, 2013 · 6 comments

Projects

None yet

4 participants

@ionelmc
Downloading/unpacking django-cms
  Downloading django-cms-2.3.5.tar.gz (3.7Mb): 3.7Mb downloaded
  Storing download in cache at ./.pip-cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fd%2Fdjango-cms%2Fdjango-cms-2.3.5.tar.gz
  Running setup.py egg_info for package django-cms
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/home/ionel/project/.ve/build/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 "/home/ionel/project/.ve/local/lib/python2.7/site-packages/django/conf/__init__.py", line 52, in __getattr__
        self._setup(name)
      File "/home/ionel/project/.ve/local/lib/python2.7/site-packages/django/conf/__init__.py", line 45, 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.
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

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

  File "/home/ionel/project/.ve/build/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 "/home/ionel/project/.ve/local/lib/python2.7/site-packages/django/conf/__init__.py", line 52, in __getattr__

    self._setup(name)

  File "/home/ionel/project/.ve/local/lib/python2.7/site-packages/django/conf/__init__.py", line 45, 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.
@ionelmc ionelmc added a commit to ionelmc/django-cms that referenced this issue Mar 10, 2013
@ionelmc ionelmc Fix the setup.py script to parse out the version instead of importing…
… the cms. Fixes #1651.
93b95a8
@sbussetti

It's not quite this simple because django-cms has dependencies that require django < 1.5. The current version of django_classy_tags (0.4), for instance requires Django>=1.3.1,<1.5

@ghost

sudo pip install django-cms
Downloading/unpacking django-cms
Downloading django-cms-2.3.5.tar.gz (3.7MB): 3.7MB downloaded
Running setup.py egg_info for package django-cms
Traceback (most recent call last):
File "", line 16, in
File "/tmp/pip-build/django-cms/setup.py", line 3, in
import cms
File "cms/init.py", line 7, in
if 'cms' in settings.INSTALLED_APPS:
File "/usr/lib/python2.6/site-packages/django/conf/init.py", line 52, in getattr
self.setup(name)
File "/usr/lib/python2.6/site-packages/django/conf/__init_
.py", line 45, 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.
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 16, in

File "/tmp/pip-build/django-cms/setup.py", line 3, in

import cms

File "cms/init.py", line 7, in

if 'cms' in settings.INSTALLED_APPS:

File "/usr/lib/python2.6/site-packages/django/conf/init.py", line 52, in getattr

self._setup(name)

File "/usr/lib/python2.6/site-packages/django/conf/init.py", line 45, 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.


Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/django-cms
Storing complete log in /root/.pip/pip.log

@lumone

I encountered the same by doing

  1. apt-get install python-pip
  2. pip install django
  3. pip install django-cms

Is there a simple set of instruction to unblock myself - I've tried to follow the discussion but am not too familiar with some of the concepts. Any help - incl. links to more helpful resources - would be much appreciated. Thanks

@ionelmc
@lumone

Worked a treat - uninstalling django and installing django-cms first installed the required version of django. Thanks.

@ojii ojii added a commit that referenced this issue Apr 7, 2013
@ojii ojii fixed cms not being installable if django is installed
fixes #1652
fixes #1651
32c0581
@ojii

fixed in 2.3.6

@ojii ojii closed this Apr 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment