Eclipse and Pydev build the perfect Python development environment (Windows chapter)

Source: Internet
Author: User

Summary: This article explains the development environment for building Python with Eclipse and Pydev.

11 Long vacation at home idle, ready to take some time to learn python. Today spent an afternoon to build a python development environment, can't help but sigh ———— open source thing is trouble ah ... Alas, pity our developers who have been spoiled by Microsoft ...

Why not use another IDE?

Idle is a little use, the wingide is for money, and not used. The Eclipse+pydev plugin is the most mainstream Python development environment.

  1. Preparatory work :

Download the 32-bit JDK6 Java development Package I don't want to do this, but eclipse relies on him, no way.

Download 32-bit Eclipse (note 1)

Download Python 2.x (note 2)

2. Installing JDK6

The installation of the JDK is easy, and the general point is to always click Next. Most tutorials say that installing the JDK requires setting environment variables, but now the IDE is no longer using environment variables to find the path to the JDK, so this doesn't matter.

3. Install Eclipse and Python

Eclipse is green software, find a place to unzip it OK. Not to mention the Python installation.

4. Install the Pydev plugin for Eclipse

Enable Eclipse ———— If the previous steps are correct, then eclipse should be able to start normally. The first launch will allow you to select a workspace, press the default settings, tick the no reminder again.

In the Help menu, choose Install New software, choose the Add button, Name:pydev (this random), Location:http://pydev.org/updates (PyDev update address), OK

Choose Pydev under Pydev for Eclipse, do not choose anything else, or rely on check that off.

Click Next and install Next. The middle will ask whether you trust Aptana, Pydev or whatever, trust can be.

Finally restart Eclipse

5. Configuring the Pydev Plugin

Select Preference in the Window menu,

1, pydev->interpreter-python,new a Python interpreter, fill in the Interpreter name and path, the path to select the corresponding Python.exe.

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.

6. Under test

File->new->project, choose Pydev under the Pydev project,grammer and interpreter Select the appropriate version, Finish.

Right-click on the PyDev Package Explorer project, New->pydev Module, write a name, Finish.

Then write a few lines of code, Run

In the dialog box that pops up, select Python Run,

Ok

Comments:
Note 1: This shows that the JDK and eclispse seem to be 32-bit or 64-bit, otherwise they may encounter problems. The first time I tried it was the combination of the 64-bit jdk+32 eclipse, and it came across and http://superuser.com/questions/186001/ Eclipse-failed-to-load-the-jni-shared-library the same problem, so decisively changed 32 jdk.

Note 2: I want to do the development of Gae, so selected version 2.6.6, generally choose the latest version can be.

Note 3:pydev Mylyn integration (optional): This depends on the PyDev for Eclipse, you have to install the latter can be installed. PyDev Django Templates Editor: This requires Aptana Studio 3.

http://kb.cnblogs.com/page/81980/

Eclipse and Pydev build the perfect Python development environment (Windows) (GO)

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.