Build a Python development environment in Eclipse, eclipsepython

Source: Internet
Author: User

Build a Python development environment in Eclipse, eclipsepython

Build a Python development environment in Eclipse

Contents

1. Background

2. Python Installation

3. Install the plug-in PyDev

4. Test Demo

I. background

Eclipse is a Java-based scalable development platform. Its official downloads include J2EE, Java, C/C ++, and mobile application versions. In addition, Eclipse can also develop languages such as Python, Android, and PHP by installing plug-ins.

Eclipse + PyDev plug-in is the most popular Python development environment. This article will introduce the use of Eclipse and PyDev plug-ins.

Ii. Python Installation

Python installation involves three steps: Downloading python, configuring environment variables, and testing the installation.

(1) download python: It is difficult to download python on a foreign server when the network speed is poor. You can directly search for Python installation in Baidu. There is a python installation package of the latest version provided by Baidu software. Download and select the installation directory and click next.

(2) Configure environment variables: I personally feel that creating environment variables in Win8 is very good.

(3) the installation is successful. Command: python-V (V is an uppercase V)

Iii. Install the plug-in PyDev

The plugin PyDev can be installed online or offline. (The premise is that the local machine has installed Eclipse correctly)

(1) install the SDK online at: http://pydev.sourceforge.net/updates. Select PyDev for Eclipse to Finish installation. Restart Eclipse and point to the Python installed on the local machine in Window> preference> PyDev> Interpreter> Python Interpreter (translator.

(2) offline Installation

Iv. Test Demo

You can use a simple crawler instance to check whether the environment is OK.

1/** 2*1. Create a PyDev project 3*2. Select Grammar Version and Interpreter 4*3. Create a package named zhiye in the project Demo, will automatically generate containing _ init _. py directory structure 5*4. On the zhiye package, create a PyDev module named test_demo, the test_demo.py file 6 is automatically generated. The local Python version 3.4 8 **/9 # coding: utf810 11 import urllib. request12 13 url = "http://www.cnblogs.com/runforlove" 14 request = urllib. request. request (url) 15 response = urllib. request. urlopen (request) 16 print (response. code) 17 print (response. read (). decode ("utf8 "))Python Demo

The test is successful Based on the code.

 

 

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.