4

When running syncdbI'm getting the error `ImportError: No module named south. Any advice? Django 1.5.1 and Python 2.7.5

I think South is already installed because I just ran easy_install south and got

[ckoziak@web415 mvp_landing]$ easy_install south
Searching for south
Best match: South 0.8.1
Processing South-0.8.1-py2.4.egg
South 0.8.1 is already the active version in easy-install.pth

Using /home/ckoziak/lib/python2.4/South-0.8.1-py2.4.egg
Processing dependencies for south
Finished processing dependencies for south

But before this I ran pip install south and got:

[ckoziak@web415 mvp_landing]$ ls
join  manage.py  mvp_landing  static
[ckoziak@web415 mvp_landing]$ pip install south
Traceback (most recent call last):
File "/home/ckoziak/bin/pip", line 7, in ?
sys.exit(
File "/usr/local/lib/python2.4/site-packages/pkg_resources.py", line 277, in       load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.4/site-packages/pkg_resources.py", line 2180, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.4/site-packages/pkg_resources.py", line 1913, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/home/ckoziak/lib/python2.4/pip-1.4-py2.4.egg/pip/__init__.py", line 10, in ?
from pip.util import get_installed_distributions, get_prog
File "/home/ckoziak/lib/python2.4/pip-1.4-py2.4.egg/pip/util.py", line 17, in ?
from pip.vendor.distlib import version
File "/home/ckoziak/lib/python2.4/pip-1.4-py2.4.egg/pip/vendor/__init__.py", line 8
from __future__ import absolute_import
SyntaxError: from __future__ imports must occur at the beginning of the file

'south'is in my settings file. I have a local and live versions with __init__joining them

__init__:

from .base import *

try:
    from .local import *
except:
    pass

try:
    from .live import *
except:
    pass

.local(settings file), minus db info:

MEDIA_ROOT = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "static", "media")

STATIC_ROOT =  os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "static", "static-only")

STATICFILES_DIRS = (
    os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "static", "static"),
)

TEMPLATE_DIRS = (
    os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "static", "templates"),
    )
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
'south',
'join',
)   

.live (settings file) no db set up yet:

MEDIA_ROOT = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "static", "media")

STATIC_ROOT =  os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "static", "static-only")

STATICFILES_DIRS = (
    os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "static", "static"),
)

TEMPLATE_DIRS = (
    os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "static", "templates"),
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # Uncomment the next line to enable the admin:
    'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    'django.contrib.admindocs',
    'south',
    'join',
)   
Chris K
  • 217
  • 1
  • 4
  • 9

1 Answers1

1

Error message says you installed south to Python 2.4.

You should install south to python 2.7.

falsetru
  • 357,413
  • 63
  • 732
  • 636
  • That's weird. I just ran pip install to do it so it must be automatic. Any idea how to install to the correct folder? I'm on Python 2.7.5. – Chris K Aug 03 '13 at 14:10
  • @ChrisK, pip seems to be installed Python 2.4, too. – falsetru Aug 03 '13 at 14:25
  • Weird. So do I have to uninstall both pip and south then reinstall to the correct folder? If so, can you point to instructions? This is my first project and I'm really not sure what steps are next. Thanks for your help. – Chris K Aug 03 '13 at 14:51
  • @ChrisK, Sorry, I can't help you. I don't know your system. – falsetru Aug 03 '13 at 14:55
  • OK, thanks for your help. I found [this](http://stackoverflow.com/questions/11080614/easy-install-gets-wrong-pip-version) which looks like it will point me in the right direction. – Chris K Aug 03 '13 at 15:12