Detailed steps for building a python development environment in Windows

Source: Internet
Author: User

Detailed steps for building a python development environment in Windows

This article describes how to build a python development environment in Windows.

1. Build a Java environment

(1) download the corresponding JDK or JRE from the official website and click Install.

(2) differences between JDK and JRE:

1) JDK is the Java Development Kit. In short, JDK is an SDK for developers. It provides the Java Development environment and runtime environment. The SDK is a Software Development Kit. It generally refers to a Software Development Kit, which can include function libraries and compiled programs.

2) JRE is the Java Runtime Enviroment, which refers to the Java Runtime Environment and is intended for Java program users rather than developers.

2. Install the python Compiler

(1) download the python version from the official website and click Install.

(2) Generally, version 2.7 is installed because there are many references to version 2.7 on the Internet, and many common python plug-ins are updated to be compatible with python.

3. Install the Eclipse Platform

(1) download the corresponding version of Eclipse from the official website. Because the software is green software, you do not need to install it. Unzip it to the specified path and open it directly.

4. Install the pydev plug-in.

(1) download the corresponding version of pydev from the official website and decompress it.

(2) decompress features and plugins, copy the contents of these two folders to the corresponding features and plugins folders under the Eclipse decompressed directory, and restart Eclipse

(3) Go to Eclipse, Open help-About Eclipse-Installation Details-Installed Software, and check whether pydev is successfully Installed.

5. Test and use

(1) Each time Eclipse is opened, the following dialog box will pop up. You can specify the path to build the pydev project in the Workspace according to your preferences.


(2) Whenever you specify a new path for storing the pydev project, you should reconfigure the compiler specified by pydev. Step: Open Eclipse-Window-Preferences-pydev-interpreters-python interpreter, the interface is as follows: Click New to add a python Compiler


(3) create a project: Open Eclipse-file-new-project-pydev project. The following page is displayed:


After filling in the relevant information, create the project test, right-click the new project folder, add the pydev package and name it test, and enter the package to add the pydev module named test. Then we can go to test. python code is written above py.

Note: Each package in python contains a _ init _. py file. With this file, we can import the module in this directory.

(4) edit the code: Enter the following code in test. py:

# Coding = UTF-8 ''' Created on August 20, 2014 @ author: collin''' def test (): str = 'this is for test' return str if _ name __= = '_ main _': str = test () print str

Right-click test. py, run as-python run, and check whether the operation is successful. If the operation is successful, it is displayed on the console:


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.