Eclipse + PyDev + Django + Mysql build Pythonweb development environment

Source: Internet
Author: User
Tags install django
Python has many web frameworks, including Django, Tornado, and Web. py. Django is the most popular and one of the most popular frameworks. Python has many web frameworks, including Django, Tornado, and Web. py. Django is the most popular and one of the most popular frameworks. The following describes how to build a Django development environment.

I. preparations

Software to be downloaded:

JDK: Website: http://www.oracle.com/technetwork/java/javase/downloads/jdk6downloads-1902814.html

Python installation package: I use python 2.6.6 installation package, official site is: http://www.python.org/download/releases/

Eclipse: I use Eclipse 3.7.2 for java ee developers. the official website is:

Http://www.eclipse.org/downloads/packages/release/indigo/sr2

Python: http://sourceforge.net/projects/pydev/files/

Django: https://www.djangoproject.com/download/

Mysql: http://www.mysql.com/downloads/mysql/

Mysql-Python: http://www.lfd.uci.edu /~ Gohlke/pythonlibs/

II. configuration process

My environment is Windows xp, a 32-bit system.

1. install JDK

Go to the JDK official website.

After installing JDK, configure the environment variables. For more information about how to install JDK, see my previous article.

Http://www.cnblogs.com/dolphin0520/archive/2012/03/08/2385309.html

2. install Python

Python is available in version 3.x. I personally think it is best to use version 2.6 or 2.7. There are many third-party libraries in version 2.x, which are relatively stable.

After installing Python, you need to configure the environment variables. for details about the installation method, refer:

Http://www.cnblogs.com/dolphin0520/archive/2013/03/05/2943747.html

3. install Eclipse

Download and decompress the Eclipse installation package.

4. configure Pydev in Eclipse

Pydev is an Eclipse plug-in that allows you to write Python programs in Eclipse. After downloading the Pydev installation package, decompress the package and you can see the features and plugins folders. Create a folder Pydev under the Eclipse root directory and put the decompressed two folders under the Pydev folder, create a folder named links under the Eclipse root directory (if the links folder exists, you do not need to create a new folder) and create a file named pydev under the links folder. ini, open it in notepad, and add path = Pydev to save and close it. Open Eclipse, select Window-> Preferences-> Pydev-> Interpreter-Python, and select New in the "Python Interpreters" panel on the right, in the pop-up dialog box, set "Interpreter Name" to "Python", locate the address of python.exe in "Interpreter executable.exe", and always select "OK:

Here we will introduce the method for installing Pydev offline. of course, you can install Pydev online. you can install Pydev online on Baidu.

5. install Django

On the official website, configure setup. py install. after installation, you need to configure the environment variables. In general, after installing Django in the Python installation directory

Under Lib \ site-packages, set D: \ Program Files \ Python26 \ Lib \ site-packages \ django \ bin; add it to the path of the system environment variable (note that the path value depends on your installation ). Close cmd after successful addition. Restart a cmd and enter the command django-admin.py startproject mysite. If no error is prompted, the installation is successful.

6. install Mysql

Specific installation process can refer to: http://wenku.baidu.com/view/49b110c7bb4cf7ec4afed083.html

7. install Mysql-Python

Mysql-Python is an interface for connecting Python to Mysql, in the http://www.lfd.uci.edu /~ Gohlke/pythonlibs/after downloading the corresponding installation file, open cmd, enter python, and then enter import _ mysql and import MySQLdb. If no error is prompted, 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.