1
votes

I installed South using pip.

Following the official guide (http://south.readthedocs.org/en/latest/installation.html#installation)

I add 'south', to my installed_apps, run manage.py syncdb, get this:

*Long Traceback ending in south\management\commands\syncdb.py, line 52 except Import Error, exc:

SyntaxError: invalid syntax

Take south away, run syncdb, everything is fine. What gives?

UPDATE: South only works on Python 2.x so installing 2.7 did the trick. Thank you IRC.

2
Which version of South are you using? Which version of Django are you using. Post the entire stacktrace, perhaps link to a pastebinHedde van der Heide
And also, which version of Python.Daniel Roseman

2 Answers

1
votes

I do not know what you may have done wrong, but to do the work you need to just south of 3 small steps, described previously by you.

1) pip install south 2) Add the 'south' in your INSTALLED_APPS the end of all "django.contrib" 3) run python manage.py syncdb

With these steps your syncdb will be different and, from this point forward, you should normally use the south.

I did a video recently (in Portuguese), showing how to install and run south with a project already started, maybe this video can help you http://bit.ly/XffRGy

1
votes

I got the same error using python 3.2.3. I my case this is a non-backwards compatible change from python 2.*. I went to the source file and deleted the ", exc" you will find at the end of an except statement. This fixed the error in question, however you will get more errors from there. I tried running 2to3 on the whole south directory and and not getting and code specific errors anymore. Unfortunalty I am now getting and error "NameError: global name 'exc' is not defined" but with no traceback. I have been stuck here for a while, but at least this is progress. I will report if I get this thing working.

[Check here for info regarding the specific incompatibility. Under the heading "Changes Already Present In Python 2.6"] (http://docs.python.org/release/3.1.3/whatsnew/3.0.html)