Install Python +eclipse pydev plugin under Windows

Source: Internet
Author: User

Directory:

I. Introduction to Python

two. Install Python

1. Installing under Windows

2. Install under Linux

Three. Configuring the Python Integrated Development Environment (IDE) under Windows

1. Installing the Pydev plugin in Eclipse

2. Configure Python interpreters

Four. Create Python Project

Five. Writing HelloWorld

Six. Summary

A. Introduction to Python:

Python has a version of Linux, Windows, Mac OS, and other operating systems that work properly, regardless of the operating system. You can use it across platforms unless you are using platform-related features or a platform-specific library.
  
1. Python is also available in a number of implementations, in the following ways:
CPython: Written in C language.
Java implementation version of the Jython:python language, which compiles the code into Java bytecode.
IronPython: Introduced Python to the. NET environment.
The Pypy:python interpreter itself is written in Python.

2. Python Features:
Simple
Easy to learn
Free Open Source
High-level language
Portability
Explanatory nature
Object oriented
Scalability
can be embedded
A rich library
  
two. Install Python

1. Installing under Windows
The reason why Windows is so common is that all the operations under Windows are very simple, and installing the software is just a little bit "next". Python is no exception, you can go online next to the Windows version of Python (all over the Internet) I use the python-2.7.2, the next good after the direct installation is OK. Finally, remember to configure the environment variables, the following:

1) Locate the path in the system variable, see (Figure 1)

2) Edit the path value and add the Python path you installed, see (Figure 2)

3) Verify that the Python installation configuration is successful, open cmd, enter Python, and if the following interface appears, your Python installation is successful, see (Figure 3)

2. Install under Linux


1) Download Source: http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2


2) installation, generally does not appear too big problem, may have the problem of permissions, as long as the command before the addition of sudo can be resolved.

Python code
    1. $ tar–jxvf python- 2.7 . 3.tar . bz2
    2. $ cd python-2.7. 3   
    3. $./configure
    4. $ make
    5. $ make Install


3) test, enter Python in the terminal, if it appears (Figure 3) The result, then the installation succeeds. However, in some versions of Linux installed by default Python, the default installation of Python version is generally low, the above operation does not make the system currently used by the Python version of the new to python-2.7.3, but also to do the following:

Python code
    1. #cd/usr/bin   
    2. #ll |grep python//view Python-related files in this directory   
    3. #rm-rf python//python file is a soft-connect file that points to the default installed Python   
    4. #ln-S python_home/python-2.7.3/python.exe./python//python_home for you to unzip the Python directory, recreate a connection file, point to the newly installed Python   
    5. #python//test, if the version number that appears is python-2.7.3, the installation succeeds, see (Figure 4)   

Three. Configuring the Python Integrated Development Environment (IDE) under Windows


Many of my friends using Python are directly developed in the Vim editor, and they say that the Vim editor is very powerful and I have used it for a while, but I don't really like the black box, it feels too monotonous, and it doesn't feel as powerful as they say. Maybe I don't know the power of the VIM function yet. Another reason: I'm a Java programmer who has been using eclipse since I was a freshman and has an inexplicable affinity for the Eclipse development environment. And, for Python, now the best open source IDE is a combination of Eclipse and Pydev (http://pydev.org) plug-ins that are not free. --excerpt from the advanced programming of Python


1. Installing the Pydev plugin in eclipse

1) Installation Method one:
To Yoxos website Custom has Pydev plug-in Eclipse compress package, after decompression can use, convenient bar. Yoxos can also customize eclipse with other plugins, such as Android, see (Figure 5)

2) Installation Method two:
Use Eclipse to install plug-ins, go to help->install New software, always click Next, you know, see (Figure 6)

3) Installation Method Three:
Download Pydev directly, I downloaded in csdn, the version number is PyDev-2.6.0, unzip as (Figure 7), the plugins and features directory files are copied into the plugins and features directory of Eclipse, respectively. Re-opening eclipse is OK.

2. Configure Python Interpreters


1) Open eclipse->preferences, search interpreter, see (Figure 8)

2) Click Auto Config, search python automatically, configure complete (Figure 9), click OK.

(Note: If you have an eclipse path with Chinese characters, this process will error, see (Figure 10), as long as the path to the English character is OK.) This problem let me toss for a long time, must take out to say)

The specific errors are:

Java code
    1. Unable to gather the needed info from the system.
    2. This usually means, your interpreter is not in
    3. The system PATH.
    4. Com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:Invalid byte 2   of 2-byte utf-8 sequence.

Four. Create Python Project


1. Select Pydev Project, see (Figure 11)

2. Fill in the project name, click Finish, a Python project has been created successfully, see (Figure 12)

3. Create a good project such as (Figure 13)

Five. Writing HelloWorld

1. Create the Pydev Module under the Pytest package, see (Figure 14)

2. Write helloworld.py, there are automatic hints Oh, so the encoding is very happy, run the program (running As->python run), print HelloWorld, see (Figure 15)

Six. Summary:


Python's installation and configuration is complete, and we can happily develop it in this set of integrated development environments. I'm sure you'll like Python. I will always be with the new Python-related articles, and look forward to it ...

Install Python +eclipse pydev plugin under Windows

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.