Build a python development environment in eclipse

Source: Internet
Author: User

in the Eclipse Built in Python Development Environment

From: http://hi.baidu.com/hqwfreefly/blog/item/2543181d0afd9604314e150e.html

Objective

I have recently been fascinated by python, but have not found a satisfactory IDE. While it's cool to use the VIM Editor + command line, a good IDE can actually make development a lot faster. So I think of eclipse--a god-like weapon. After some twists and turns, after all, to become a fruition. I want to help with the love of Python's children's shoes.

Body

First we need to understand a little bit of--eclipse as a very good development tool, it can be used as an n multi-language IDE, but only if we need to install the corresponding compiler or interpreter. For example, common Java development requires JDK. So Python development with Eclipse also has to be Python's "JDK", the Python interpreter. The author has installed the Python2.7 version of the interpreter, in this article Python2.7 as an example of the steps to explain the construction process.

Basic requirements:

1 Eclipse (version not too old)

·2 python Interpreter (www.python.org)

Step 1:

Download the plugin Pydev for developing python in Eclipse.

File name: Org.python.pydev.feature-1.6.1.2010080312.zip.

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

Step 2:

Unzip the Org.python.pydev.feature-1.6.1.2010080312.zip. The installation of the Pydev plugin was successful by copying the contents of the extracted features and plugins folders to the same folder in the Eclipse installation directory.

Step 3:

Open Eclipse (restart eclipse if it is already open). Select window--"Presences, set

Expand Pydev, select Interpreter-python, click New ... button, in the pop-up Select Interpreter window, click Browse ... button to locate the Python interpreter that is already installed. Click the OK button in the Select Interpreter window, click the Select All button in the pop-up selection needed window, and then click the OK button to complete the setup. Then select apply--"OK in the Preferences window to complete the setup.

Python 3.x is required in the following steps, Python 2 is optional. I'm more used to Unicode, so I set it here once.


2, General->editors->text editors->spelling,encoding changed into Other:utf-8


3, General->workspace,text file encoding changed to Other:utf-8


4, find the installation directory of \plugins\org.python.pydev.debug_x.x.x.yyyymmddhh\pysrc\pydevd.py,
920 lines of encoding = Non changed to encoding = "UTF-8", Save

At this point, the Pydev configuration is complete.

Step 4:

Choose file--"new--" other. In the new window that pops up, press action:

Step 5:

In the pop-up window, fill in the Project name (project name)--Select project type (project type)--Choose the version number (if you don't have a version number that you're using)-"Select Directory Choose the version number older than your version number)--"SELECT interpreter (Interpreter)-Click the Finish button to complete the setup."

Step 6:

You can now create a new module in the project you have created,

We create an empty HelloWorld module in the SRC package,

Step 7:

As shown, write a simple HelloWorld script and run it.

Build a python development environment in eclipse

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.