Using Eclipse to build Python integrated development environment under Linux!__linux

Source: Internet
Author: User
The recent intention to start learning the long-awaited python, because the previous write code is VIM+GCC (mainly write C code), so want to try to use the integrated development environment. Popular open source Eclipse naturally became my choice, my system is UBUNTU12, below we began to build the environment!

1. First we start by downloading the software we need, the first is eclipse, because we're going to build the Python environment, so we download the Eclipseclassic version http://www.eclipse.org/downloads/ PACKAGES/ECLIPSE-CLASSIC-372/INDIGOSR2, the right side of the download link has a specific system selection, I am Linux, so i download linux-32bit, this everyone can choose according to their own system.

Because eclipse defaults to the Java environment, it needs some of the JDK files on the first run, and if not, there will be errors that cannot be opened, so we get the Oracle official http://www.oracle.com/ technetwork/java/javase/downloads/index.html to download the latest to JDK, again, according to its own system download. (although it hints to use JRE also can, but after I test, the JRE is not good, with the JRE inside the JDK can be ....) Don't know what logical 0_o!)

To extract the JDK to get the above file, we just need to copy the JRE folder inside to the Eclipse folder below.

At this point, we open eclipse executable in the Eclipse folder again, we can open it, we have successfully installed eclipse, there is no red tape, no need to modify the environment variables, it is very simple wow!
2. Next we install the latest Python. First of all, of course, go to the official Python http://www.python.org/getit/download the latest python, according to their own circumstances to choose to download, I choose to download is Python3.2.3 Compressed source tarball (for Linux, Unix or Mac OS X), download down and unzip to a random place

Extract the file as above, and then start the installation, mainly install Python's various library files and interactive shell, the installation method in the Readme file has, you can see, mainly on 4 commands:
./configure
Make
Maketest
sudo makeinstall
Open a shell and then switch to the file directory you unzipped, execute the above command, Python will install OK, after the installation is completed Python3 (you installed version), if the following output, then you install successfully. (There's a lot of things in Ubuntu that depend on Python, so the default is to install Python, but it's version 2, so if you run Python directly, you'll open the Python interactive shell, but Python2, and I want to learn Python3, is also the latest version, so install Python3, pay attention to the difference)

In this way, our latest version of Python is installed as well. The following begins to configure eclipse as the Python development environment.
3. Start configuring Eclipse. To build a python environment with eclipse, you need a plugin Pydev, open Eclipse->help->installnewsoftware, click the Add button to the right, name Pydev ( casually), location for Http://pydev.org/updates (Pydev official update address).

As shown above, we only choose Pydev foreclipse One, and then always determine, accept the agreement, the middle of a choice to trust Aptana What, you select, and then determine the line, and then restart Eclipse after the line.
4. Set Pydev. Open Eclipse->windows->preference->pydev->interpreter-python, create a new interpreter with new name, Path you use Whereispython3 (you install which version is a few) view bin, my under/usr/local/bin, called Python3, when selected, it will automatically import some library files, OK on the line.

If you don't need Java, select Pydev in the upper-right corner of the perspective (with the star icon) and turn off Java. This is done completely. Write a HelloWorld test.
Create a new Pydev project, add a hello.py file, print ("hello,python!"), and run successfully so Linux uses Eclipse to build a Python environment.

Because I like to use the latest version of the software, and ubuntu12 the speed of software sources is not very strong, update the source is still very slow, so I chose to go directly to the software to download the latest version of their own installation, if not like to do so, of course, you can search in the software center to download


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.