Forums

ImportError: No module named south

I built an application 2 years ago with Django 1.6 and am trying to put it up on PythonAnywhere. It's been a while since I've messed with the code, and I'm new to all of this, so I'm hoping someone can help me troubleshoot.

I created a virtualenv and have Python 2.7 and Django 1.9.5 installed.

2016-04-09 19:30:20,551 :Traceback (most recent call last): 2016-04-09
19:30:20,551 :  File "/bin/user_wsgi_wrapper.py", line 138, in
__call__ 2016-04-09 19:30:20,552 :    self.error_log_file.logger.exception("Error running WSGI application")
2016-04-09 19:30:20,552 :  File
"/usr/lib/python2.7/logging/__init__.py", line 1185, in exception
2016-04-09 19:30:20,552 :    self.error(msg, *args, **kwargs)
2016-04-09 19:30:20,552 :  File
"/usr/lib/python2.7/logging/__init__.py", line 1178, in error
2016-04-09 19:30:20,552 :    self._log(ERROR, msg, args, **kwargs)
2016-04-09 19:30:20,552 :  File
"/usr/lib/python2.7/logging/__init__.py", line 1270, in _log
2016-04-09 19:30:20,553 :    record = self.makeRecord(self.name,
level, fn, lno, msg, args, exc_info, func, extra) 2016-04-09
19:30:20,553 :  File "/usr/lib/python2.7/logging/__init__.py", line
1244, in makeRecord 2016-04-09 19:30:20,553 :    rv = LogRecord(name,
level, fn, lno, msg, args, exc_info, func) 2016-04-09 19:30:20,553 : 
File "/usr/lib/python2.7/logging/__init__.py", line 284, in __init__
2016-04-09 19:30:20,553 :    self.threadName =
threading.current_thread().name 2016-04-09 19:30:20,553 :  File
"/usr/lib/python2.7/threading.py", line 1160, in currentThread
2016-04-09 19:30:20,553 :    return _active[_get_ident()] 2016-04-09
19:30:20,554 :  File "/bin/user_wsgi_wrapper.py", line 130, in
__call__ 2016-04-09 19:30:20,554 :    app_iterator = self.app(environ, start_response) 2016-04-09 19:30:20,554 :  File
"/bin/user_wsgi_wrapper.py", line 144, in import_error_application
2016-04-09 19:30:20,554 :    raise e 2016-04-09 19:30:20,554
:ImportError: No module named south

[edited by admin: formatting]

Django 1.9 has its own built-in migrations library, which replaces the south library that everyone used to use before that version. (I think that the same guy wrote both.)

So if you have Django 1.6 code that uses south, your options are:

  • Create a new virtualenv with Django 1.6. This is probably the fastest way to get up and running.
  • Convert your code from Django 1.6 to 1.9, and change the migrations over from south-style ones to new Django-style ones. This will be more work, but might be worthwhile in the long run.

Thank you! It seems to be up and running now after creating the virtualenv with 1.6.

Excellent, thanks for confirming!