I'm getting a merciless
$ python manage.py migrate
Unknown command: 'migrate'
Type 'manage.py help' for usage.
I pulled the code from github onto a fresh computer. This code is tested and is working on other computers. The entire code runs fine except for the fact I can't run migrations!
Installed my virtual environment and ran pip install -r requirements.txt
. It installs everything, including South. I can check by running
$ python manage.py shell
>>> import south
>>> south.__version__
'0.7.3'
However, when I run the manage.py help
, the migrate
and schemamigration
commands don't appear listed.
I double checked that my settings.py
file has 'south' listed under INSTALLED_APPS
(I didn't change this file after pulling).
I tried pip uninstall south
and then running pip install -r requirements.txt
again, but I still get the same error.
Would really appreciate any help!
Successful import of package is not enough for Django management commands. Python can import a package easy from a zipped egg but Django needs a normal uncompressed file.
Advices that simplify your problem initially:
path..to..south/management/commands
(not zipped).south
directory in .
or ..
in your project.The advice 1 is an absolute requirement of Django. The other two are heplful even if I use multiple versions somehow for testing my applications with multiple versions of Python, Django etc.
Example of investigation of the main requirement:
$ python manage.py shell
>>> import os
>>> import south.management.commands.migrate
>>> assert os.path.isfile(south.management.commands.migrate.__file__)