Fixed #3902 -- Added some excellent notes about installing Django on Windows. Thanks, nick@efford.org.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
99d12c5d70
commit
518bc15b21
|
@ -127,16 +127,24 @@ Installing an official release
|
|||
|
||||
1. Download the latest release from our `download page`_.
|
||||
|
||||
2. Untar the downloaded file (e.g. ``tar xzvf Django-NNN.tar.gz``).
|
||||
2. Untar the downloaded file (e.g. ``tar xzvf Django-NNN.tar.gz``,
|
||||
where ``NNN`` is the version number of the latest release).
|
||||
If you are a Windows user, you can download the command-line tool
|
||||
bsdtar_ to do this, or you can use a GUI-based tool such as 7-zip_.
|
||||
|
||||
3. Change into the downloaded directory (e.g. ``cd Django-NNN``).
|
||||
3. Change into the directory created in step 2 (e.g. ``cd Django-NNN``).
|
||||
|
||||
4. Run ``sudo python setup.py install``.
|
||||
4. If you are using Linux, Mac OSX or some other flavour of Unix, enter
|
||||
the command``sudo python setup.py install`` at the shell prompt.
|
||||
If you are using Windows, start up a command shell with administrator
|
||||
privileges and run the command ``setup.py install``.
|
||||
|
||||
The command will install Django in your Python installation's ``site-packages``
|
||||
directory.
|
||||
These commands will install Django in your Python installation's
|
||||
``site-packages`` directory.
|
||||
|
||||
.. _distribution specific notes: ../distributions/
|
||||
.. _bsdtar: http://gnuwin32.sourceforge.net/packages/bsdtar.htm
|
||||
.. _7-zip: http://www.7-zip.org/
|
||||
|
||||
Installing the development version
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -144,34 +152,51 @@ Installing the development version
|
|||
If you'd like to be able to update your Django code occasionally with the
|
||||
latest bug fixes and improvements, follow these instructions:
|
||||
|
||||
1. Make sure you have Subversion_ installed.
|
||||
2. Check out the Django code into your Python ``site-packages`` directory.
|
||||
1. Make sure that you have Subversion_ installed, and that you can run its
|
||||
commands from a shell. (Enter ``svn help`` at a shell prompt to test
|
||||
this.)
|
||||
|
||||
On Linux / Mac OSX / Unix, do this::
|
||||
2. Check out Django's main development branch (the 'trunk') like so::
|
||||
|
||||
svn co http://code.djangoproject.com/svn/django/trunk/ django_src
|
||||
ln -s `pwd`/django_src/django SITE-PACKAGES-DIR/django
|
||||
svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk
|
||||
|
||||
3. Next, you need to make sure that the Python interpreter can load Django's
|
||||
code. There are various ways of accomplishing this. One of the most
|
||||
convenient, on Linux, Mac OSX or other Unix-like systems, is to use a
|
||||
symbolic link::
|
||||
|
||||
ln -s `pwd`/django-trunk/django SITE-PACKAGES-DIR/django
|
||||
|
||||
(In the above line, change ``SITE-PACKAGES-DIR`` to match the location of
|
||||
your system's ``site-packages`` directory, as explained in the
|
||||
"Where are my ``site-packages`` stored?" section above.)
|
||||
|
||||
On Windows, do this::
|
||||
Alternatively, you can define your ``PYTHONPATH`` environment variable
|
||||
so that it includes the ``django`` subdirectory of ``django-trunk``.
|
||||
This is perhaps the most convenient solution on Windows systems, which
|
||||
don't support symbolic links. (Environment variables can be defined on
|
||||
Windows systems `from the Control Panel`_.)
|
||||
|
||||
svn co http://code.djangoproject.com/svn/django/trunk/django c:\Python24\lib\site-packages\django
|
||||
.. admonition:: What about Apache and mod_python?
|
||||
|
||||
3. Copy the file ``django_src/django/bin/django-admin.py`` to somewhere on your
|
||||
system path, such as ``/usr/local/bin`` (Unix) or ``C:\Python24\Scripts``
|
||||
If you are using Apache and mod_python rather than Django's
|
||||
development server, then instead of defining the ``PYTHONPATH``
|
||||
shell environment variable, you will need to specify the
|
||||
``PythonPath`` directive in your Apache configuration file.
|
||||
|
||||
4. Copy the file ``django-trunk/django/bin/django-admin.py`` to somewhere on
|
||||
your system path, such as ``/usr/local/bin`` (Unix) or ``C:\Python24\Scripts``
|
||||
(Windows). This step simply lets you type ``django-admin.py`` from within
|
||||
any directory, rather than having to qualify the command with the full path
|
||||
to the file.
|
||||
|
||||
You *don't* have to run ``python setup.py install``, because that command
|
||||
takes care of steps 2 and 3 for you.
|
||||
You *don't* have to run ``python setup.py install``, because you've already
|
||||
carried out the equivalent actions in steps 3 and 4.
|
||||
|
||||
When you want to update your copy of the Django source code, just run the
|
||||
command ``svn update`` from within the ``django`` directory. When you do this,
|
||||
Subversion will automatically download any changes.
|
||||
command ``svn update`` from within the ``django-trunk`` directory. When you do
|
||||
this, Subversion will automatically download any changes.
|
||||
|
||||
.. _`download page`: http://www.djangoproject.com/download/
|
||||
.. _Subversion: http://subversion.tigris.org/
|
||||
.. _from the Control Panel: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx
|
||||
|
|
Loading…
Reference in New Issue