Monday, September 3, 2012

Possible problems with your django installation

In case you have installed Django using a package manager, then there are chances that you will face the following issues and the django installation pitfalls page might not help you. I faced the same and here are the solutions that worked for me.

django-admin.py not found:
The reason for this error to occur is, the directory of the file does not belong to your system path. You can either add the directory to your path or simply link your file.
How will you find the directory location?
Here's how: in your python shell enter the following commands
>>import django
>>django.__file__
Then type this in your terminal to add a link to django-admin.py:

sudo ln -s {location}/django-admin.py /usr/local/bin/django-admin.py

Another error would be with the installation of database backend:
For example, you would not be able to add mysqldb database. Probable cause for this problem is that you do not have the package 'python-mysqldb' installed.
Installing the package should solve your problem.

In case you are going to use openid or any such service, it is better to check whether the required python packages are installed.

  

No comments:

Post a Comment