The most flexible way, IMO, to install without the old setuptools,
- download virtualenv
$ curl -O http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.7.1.2.tar.gz - extract
tar xzf virtualenv-1.7.1.2.tar.gz - use the version of Python you want to run Django to install virtualenv like
$ python2.7 virtualenv-1.7.1.2/virtualenv.py --distribute ~/env - type env in which the pip is already installed.
$ source ~/env/bin/activate - install packages in current env instead of polluting global space or need sudo
pip install Django
Then Django will be installed on the path, for example ~/env/lib/python2.7/site-packages/django . - Or you can download
pip install -e svn+http://code.djangoproject.com/svn/django/trunk
to install the last Django connecting code, and the source will be in ~/env/src/django/django . Then you can read the source or change it. In addition, you may have full make html documents in ~/env/src/django/docs
The things set by the above method are completely local, you do not need to enter sudo or risk tangled paths like /usr/local/lib , especially since you could install several versions of Django or Python does not affect each other!
Alternatively, you can try virtualenvwrapper.
okm
source share