Please feel free to share the things that tripped you up when you install Django. does not work


-bash: command not found

Probable cause

You don't have on your command search PATH.


Link <django_installation>/bin/ to whereever on your PATH.

Note that Python on most unix-like system uses /usr/local/lib/python2.X/site-packages/ for 3rd-party packages:

sudo ln -s /usr/local/lib/python2.4/site-packages/django/bin/ /usr/local/bin/

However, Python 2.6 uses {{ /usr/local/lib/python2.6/dist-packages/}} for 3rd-party packages:

sudo ln -s /usr/local/lib/python2.6/dist-packages/django/bin/ /usr/local/bin/

You may get a "permission denied" message after this. Changed the permissions of the file to be executable.

sudo chmod +x /usr/local/bin/

If you've installed Python 2.6 and made it the default version, you may have to use startproject mysite instead.


On unix-like system, says like: pkg_resources.DistributionNotFound: Django==0.91

Probable cause

You have two different versions of Django installed, and your does not point correct version.


Locate by which Unlink it and link correct from bin subdirectory of your django installation.

Database backends


Using MySQLdb as DBI, it shows ImportError: cannot import name ImmutableSet .

Probable cause

You probably had MySQLdb 1.2.0 (or prior) installed, then override it to upgrade to 1.2.1.

MySQLdb versions prior than 1.2.0 have in MySQLdb installation. It does not contain ImmutableSet that is actually defined by built-in sets module in Python 2.4. If it left in your MySQLdb directory, it will be imported by somewhere in MySQLdb code in priority and cause ImportError.


Delete from your MySQLdb installation (only if you are sure using 1.2.1 or later).

Last modified 6 years ago Last modified on 02/19/11 03:51:46
Back to Top