Python Development Environment Configuration

Source: Internet
Author: User

1: Install python2.7 Python-2.7.3.msi

2: Note Configuration environment variable c:python27;

Configure the Python environment in 3:eclipse.

4: Install Pydev. You can download the compressed package and unzip the two-directory files to the corresponding Eclipse directory (plugin and features). Reconfigure window->preferences->pydev->interpreter-> New ... Find your own Python installation directory

5: After installation can be a simple test.

6: Install the configuration Django. I'm using the django1.4 version.

7: Download Django-1.4 link https://pypi.python.org/pypi/Django/1.4

8: The downloaded Django uncompressed command line into the directory e:django-1.4 execute command python setup.py install

9: Install Mysql-python

Simple installation Method: Use the Easy_install tool to install script execution in Eclipse http://peak.telecommunity.com/dist/ez_setup.py

Note After installation, it is a good idea to ensure that the Easy_install directory has been added to the PATH environment variable:

C:python27scripts

Python MySQL support, you can execute the following commands, the system will automatically find the relevant software packages in the PyPI Web site list: Easy_install Mysql-python

There may also be problems with the installation process, possibly a python environment variable or a compiler problem. Of course, before installing Mysql-python, you must first install MySQL

10: Write the Django project in eclipse after Setup completes

11:new Pydev Django Project Simple test

12: Under the package new helloworld.py file, write

From django.http import HttpResponse

def index (Request):

Return HttpResponse (' Hello world! ')

13: Modify the contents of the urls.py file to:

From django.conf.urls.defaults Import Patterns

Urlpatterns = Patterns ("",

(R ' ^$ ', DjangoTest2.helloworld.index ')

)

Note the path in urls.py to write the path to your project file

14: Right-run on the project, Access http://127.0.0.1:8000/display Hello world!

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.