"Go" windows under the Python Development environment building

Source: Internet
Author: User

1-Pre-preparation for Python installation

Python development has many tools, and Eclipse+pydev is the most common. Eclipse Platform for the development of students, it must be thunderclap piercing, since no nonsense. And Pydev is a Python IDE plugin under the Eclipse platform, and with the Pydev plugin we can turn eclipse into a powerful and easy-to-use Python IDE. This article simply introduces the installation and configuration process of Eclipse+pydev, as for the development, commissioning and other advanced topics do not do in-depth analysis.

First, you need to install Python's compilation and execution program, and we recommend installing the Python2.7.3 version. As for the download method, it is recommended to use the "Software Management" tool of QQ computer Butler. After the download is successful, install automatically, install directory by default "C:\Python27", please note the installation directory, the subsequent configuration of Eclipse's Python execution environment needs to be used.

Then, you need to install the Eclipse development tools. Please go to https://www.eclipse.org/downloads/download, after successful decompression can. The installation process for Eclipse is no longer a repeat.

2--Installation and configuration

The first step, install the Pydev plugin. Start eclipse, and in the menu bar, choose Help > Install New software .... Click "Add" in the pop-up box to add the Pydev update site. As shown in the following:

In the Location input box, fill in the Pydev plugin update address: http://pydev.org/updates

Step Two, after adding the Pydev update site, go back to the original interface, select the "Pydev" you just added in the "Work with" drop-down list box, the system will automatically retrieve the components that need to be installed, we just have to select all, and then always next. As shown in the following:


Step three, after the second step, the basic installation process has been successful. To restart Eclipse, we can now start configuring the python execution parameters for eclipse. In the Eclipse menu bar, choose Windows > Preferences, and then in the left tree menu, choose PyDev > Interpreters > Python interpreter. As shown in the following:


Fourth Step, click "New ...", as shown in the dialog box:

"Interpreter name" is the descriptive name of the current Python interpreter, and it is recommended to have a meaningful name in order to make it easier for us to choose the interpreter version later when we run the program. For example, named "Python2.7.3", then when we select the Python target, we can know at a glance that it points to a Python interpreter with version 2.7.3.
"Interpreter executable" is the executable path of the current Python interpreter. When we install Python, we install it by default in "C:\Python27", and the path of the interpreter is "C:\Python27\python.exe".

If we need to install several other versions of Python, we can continue to add the configuration to eclipse as this method.

Fifth Step, when the execution directory of Python is selected correctly, Eclipse automatically locates the library function directory of the current Python interpreter and so on. Success is as follows:

3--Verification

The first step is to create a new Pydev project. In the Eclipse's menu bar, choose File > New > Other ... > PyDev > PyDev Project. " As shown in the following:


The second step is to create a python file. On the Eclipse menu bar, choose File > New > file. As shown in the following:


Step three , edit helloworld.py. As shown in the following:


Fourth Step , run the script file. On the Eclipse menu bar, choose Run > Run as > Python Run, and in the Console output bar, print "Hello world!". As shown in the following:


Since then, the Python IDE has been successfully installed and tested, and now our Python learning journey is underway! wish to learn happy!!!

"Go" windows under the Python Development environment building

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.