Configuration illustration of Python + Django development environment in Windows

Source: Internet
Author: User

1. install and configure the development environment

1.1 prepare for Installation

Download the following software

Eclipse for C/C ++

Sun JDK 1.6 does not have to be 1.6, and 1.5 does.

Python3.1 python2.6.4 pythone2.5.2

Mod_python-3.3.1.win32-py2.5-Apache2.2

MySQL-python-1.2.2.win32-py2.5

Pysqlite-2.5.5.win32-py2.5

Python.pydev.feature-1.5.0.1251989166-sources.zip

Django-1.1.1.tar.gz

1.2 Apache installation Configuration

I am too lazy to configure it. I found a suite of Apache + MySQL + PHP on the Internet,

You can go to the essamp \ apache2 \ conf \ httpd. conf file and add

Loadmodule python_module modules/mod_python.so

Run essamp and click "run" to start the service.

Click Browse default website. The following figure shows that the installation is successful.

1.1 install and configure eclipse and Python

1.1.1 install JDK

1.1.2 decompress eclipse and place it under c: \ eclipse.

1.1.3 install Python

Install the corresponding Python version, here is the python2.5 version, Now Django only supports to 2.5, other versions can exist at the same time, install the MySQL-python-1.2.2.win32-py2.5 fuse, copy the two directories to the "C: \ Eclipse" directory under the root directory of eclipse installation"

1.1.4 configure environment variables, click "properties" in "My Computer" on the desktop, select the "advanced" tab, and click "environment variables ..." Button to modify the system variable Path =; % java_home % \ bin, which is directly added to the end,

Two new system variables

Java_home = c: \ Program Files \ Java \ jdk1.6.0

Classpath =.; % java_home % \ Lib \ tools. jar; % java_home % \ Lib \ DT. Jar

1.1.5 start eclipse and choose "help"> "install new software…" from the menu ...", Dialog box,

Click "Add ..." Enter the address and click "OK,

Click "Work with" and select the new pydev extensions. The latest software version is displayed.

Select All and click "next>"

Select All and click "finish" to complete the upgrade.

1.1.6 select "window"> "Preferences" in the menu. the dialog box is displayed,

Click "New ..." Click "Install Python" and click "OK ".

1.2 Django installation Configuration

1.2.1 Installation

Decompress Django. I decompress it to python25, and there is a setyp. py file in the Django directory. Open the running window to install it.

1.2.2 to facilitate development, we will configure system variables again

Path = c: \ python25 \ scripts; C: \ python25 \ Lib \ Site-packages \ Django \ bin

1.2.3 test whether Django is successfully installed

First check whether c: \ python25 \ Lib \ Site-packages \ Django \ bin exists, and then create a project

Startproject testemo Django-admin.py

After running manage. py runserver, enter http: // 127.0.0.1: 8000/in the address bar of the browser/

If the preceding figure is displayed, the installation is successful.

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.