Install Django in Windows

Source: Internet
Author: User
Tags django website install django
Install Django on Windows

 

RecentCommunityThere are many questions about Django installation. Here I will summarize them.

First, prepare the relevant software:

    • Python 2.4.3
    • PIL for py2.4
    • Mysqldb for py2.4
    • Django 1, 0.95
    • Apache 2.0.x
    • Mod_python 3.2.5 for py2.4

All of the above software can be downloaded online. The corresponding website is as follows:

    • Http://www.python.org
    • Http://www.pythonware.com/products/pil/
    • Http://sourceforge.net/projects/mysql-python
    • Http://www.djangoproject.com/
    • Http://httpd.apache.org/
    • Http://httpd.apache.org/modules/python-download.cgi

All the above software except Django download the installation version of exe.

After the preparation is complete, you can start the installation. The installation steps are as follows:

1. Install Python

This step is very simple. Double-click to run Python installation.Program, Follow the Wizard to go to the next step. We recommend that you set a directory that is easy to find in the path. For example, set it to D: \ python_home \ python24. In this way, other Python-related resources can be organized into the python_home directory.

2. Install PIL

PIL is the abbreviation of Python imaging library and is mainly used to process images. It is installed here to automatically generate thumbnails for uploaded images in the Django system. The installation method is also quite simple, and you can double-click to run it.PIL-1.1.5.win32-py2.4.exeThis file, and then all the way to next. Because Python has been installed before, the installation program of PIL will read the python installation path from the registry, then, the Pil is automatically installed under Python \ Lib \ Site-packages \ Pil.

3. Install mysqldb

Install PIL in the same way.

4. Install Django

The exciting time has arrived. You can download the latest version of release 0.95 from the Django website, or the latest release from SVN. If you download the release version, decompress it to a directory, for example, D: \ python_home \ Django.

Since Django currently adopts the python. Egg method, you need to install setuptool before installing Django. This step is very simple. Open a command prompt window and enterD: \ python_home \ Django>, Enter the commandPython ez_setup.pyIt will automatically check whether setuptool is installed in the system. If it is not installed, it will be connected to the Internet to download the latest one and install it. The next step is to install Django. InputPython setup. py installThis command will install Django under site-package and set SYS. Path.

At this point, the basic installation of Django is complete.

5. install Apache

The above installation is only a development environment, although it can run but cannot be used as a production system. Here we use a combination of Apache + mod_python to implement a production system.

Installing Apache is also quite simple. Double-click the installation file and follow the wizard.

6. Install mod_python

Double-click the installation file and follow the Wizard to start next. When downloading mod_python, make sure that it matches the apache version. Currently, the Windows version of mod_python does not correspond to Apache 2.2. Therefore, if you install Apache 2.2, you cannot use it.

Everything has been installed. The next step is to test whether mod_python can be used, and deploy Django-developed applications to Apache, for more information, see the article 《How to Use Django in the mod_python Environment.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.