Showing posts with label upgrade. Show all posts
Showing posts with label upgrade. Show all posts

Monday, June 6, 2016

There is no South database module 'south.db.mysql' for your database - Django


Django 1.8+

Recently I come across this error, while running my Django application 
python manage.py runserver

There is no South database module 'south.db.mysql' for your database. Please either choose a supported database, check for SOUTH_DATABASE_ADAPTER[S] settings, or remove South from INSTALLED_APPS.

To fix it, you would try to lookup for south.db.mysql or try to search if you SOUTH_DATABASE_ADAPTERS. But you won't find it in your solution. To fix it you have two choices -

1. Manually downgrade to lower Django version i.e.1.6 or so. 
pip install Django==1.6.10

2. Uninstall South from your environment (virtual environment) and move to built-in migration process. 
pip uninstall south


Good luck!

Monday, December 28, 2015

pip freeze - unknown revision or path not in the working tre

While trying to get the list of the current package using pip freeze, it throws following error -

> pip freeze
Complete output from command /usr/bin/git rev-parse (detachedfrom0af02a9):
fatal: ambiguous argument '(detachedfrom0af02a9)': unknown revision or path not in the working tree.

Use '--' to separate paths from revisions, like this:

'git [...] -- [...]'

(detachedfrom0af02a9)

----------------------------------------
Command /usr/bin/git rev-parse (detachedfrom0af02a9) failed with error code 128

Storing complete log in /home/youraccount/.pip/pip.log

It's issue with the outdated pip package. To fix the issue -

You can upgrade it with following command -

pip install --upgrade pip

It should fix the issue.

Monday, March 10, 2014

Update Django on Webfaction

We are using webfaction for our Django Application, and its been really awesome service for the Django apps. Most of the things are configurable from their support dashboard.

Now you get to choose the Django and python version when you setup your application first time. However, later if you want to upgrade to newer version of the Django as it made available by Django community, you can follow below steps. In this example my current version of Django is 1.4.1 and I am going for Django 1.4.5.

Please note, following steps are just to update the Django version, if there are functional, API, Model query, settings or any other changes required inside your application, you will need to refer to Django official documentation or migration guide provided on the Django.

Here are the steps to upgrade Django in Webfaction -

1. Go to your App directory. 
> $HOME/webapps/

2. Get the version you want. (here we are extracting 1.4.5)
> wget https://www.djangoproject.com/download/1.4.5/tarball/

3. Extract.
> tar -zxvf Django-1.4.5.tar.gz

4. Rename the existing one. (existing django to django.old)
> mv lib/python2.7/django lib/python2.7/django.old

5. move the new one to lib (now as we have renamed, we can move the content from new django package to lib/python 2.7)
> cp -R Django-1.4.5/django lib/python2.7

6. move the management scripts (copy management script for wsgi, and app creation etc.)
> cp Django-1.4.5/django/bin/* bin
7. Restart and make sure it runs fine.
> apache2/bin/restart

8. delete the extract and tar (only after checking that it works fine, you can remove the floating folder and file from the directory.)
> rm -rf Django-1.4.5*

And that should do the trick! Feel free to drop message or email if you run into any issue.

Thanks.

Sunday, January 12, 2014

Error on upgrading setuptools using pip

Today I upgraded pip using below command as for some reason some of the package it was not able to find and throwing strange error that its not able to find the requested package -

pip install --upgrade pip

Existing installation was 1.0.2 and it installed the 1.5

After the upgrade, it started throwing following error on requesting any install

Wheel installs require setuptools >= 0.8 for dist-info support.
pip's wheel support requires setuptools >= 0.8 for dist-info support.
Storing debug log for failure in /Users/Jaimin/.pip/pip.log

What it means is my pip install 1.0.2 had old setup tools and after upgrading to 1.5 it needs newer version of setup tools.

Js-MacBook-Pro:dj16 J$ pip install --upgrade setuptools
Wheel installs require setuptools >= 0.8 for dist-info support.
pip's wheel support requires setuptools >= 0.8 for dist-info support.
Storing debug log for failure in /Users/Jaimin/.pip/pip.log

So it still throws the error on upgrade of setuptools, you need to use following command to upgrade -

pip install setuptools --no-use-wheel --upgrade

It will be able to upgrade the setuptools and pip should work fine after this.