Install Eclipse 3.7 Indigo and configure Eclipse

1. Overview

1.1 What is Eclipse?

Eclipse is a platform that has been designed from the ground up for building integrated web and application development tooling. By design, the platform does not provide a great deal of end user functionality by itself. The value of the platform is what it encourages: rapid development of integrated features based on a plug-in model.

Eclipse provides a common user interface (UI) model for working with tools.  It is designed to run on multiple operating systems while providing robust integration with each underlying OS.  Plug-ins can program to the Eclipse portable APIs and run unchanged on any of the supported operating systems. 

At the core of Eclipse is an architecture for dynamic discovery, loading, and running of plug-ins. The platform handles the logistics of finding and running the right code. The platform UI provides a standard user navigation model.  Each plug-in can then focus on doing a small number of tasks well. What kinds of tasks? Defining, testing, animating, publishing, compiling, debugging, diagramming...the only limit is your imagination.

 

1.2 What is Python?

Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.

Often, programmers fall in love with Python because of the increased productivity it provides. Since there is no compilation step, the edit-test-debug cycle is incredibly fast. Debugging Python programs is easy: a bug or bad input will never cause a segmentation fault. Instead, when the interpreter discovers an error, it raises an exception. When the program doesn't catch the exception, the interpreter prints a stack trace. A source level debugger allows inspection of local and global variables, evaluation of arbitrary expressions, setting breakpoints, stepping through the code a line at a time, and so on. The debugger is written in Python itself, testifying to Python's introspective power. On the other hand, often the quickest way to debug a program is to add a few print statements to the source: the fast edit-test-debug cycle makes this simple approach very effective.

 

1.3. About this tutorial

This tutorial will explain how to install Eclipse 3.7, Python 3.2 and the Python plugin (PyDev) for Eclipse.

 

 

2. Installation

2.1 Eclipse

2.1.1 Donwload and install Eclipse [Software Manager]

First open your Software Manager from MenuOther  Software Manager and type in the search box "eclipse" without quotes and click on eclipse.

 

 

 

Now press the button install

 

 

Finally to launch Eclipse go to MenuProgramming  Eclipse

 

 

2.1.2 Donwload and install Eclipse [Manually]

If for some reason you couldn't install Eclipse 3.7 indigo from Software Manager follow the following steps.

First you need to download Eclipse for 32bit or 64bit system. In my case I downloaded the 64bit version.

 

 

2.1.3 Extract it

Once you download the file locate it and extract it. I assume that the downloaded file is located in /home/Downloads. Open a terminal with Ctrl+Alt+T and type 

cd ~/Downloads (With this command we change the default directory "/" to "/Downloads") and then type

 

For 32bit version

tar xvf eclipse-SDK-3.7.2-linux-gtk.tar.gz to extract the file.

 

For 64bit version

tar xvf eclipse-SDK-3.7.2-linux-gtk-x86_64.tar.gz to extract the file.

 

2.1.4 Move to /opt folder

Opt is reserved for additional software you install. This is kind of like ‘Program Files‘ for linux.

Once you extract the file type the following commands invidually:

sudo mv eclipse /opt/

cd /opt

sudo chown -R root:root eclipse

sudo chmod -R +r eclipse

 

2.1.5 Create an eclipse executable in your path

To do this execute the following commands:

sudo touch /usr/bin/eclipse

sudo chmod 775 /usr/bin/eclipse

 

Now press Alt+F2 and type:

gksu gedit /usr/bin/eclipse

 

 

and copy paste the below code:

 

#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/opt/eclipse"

$ECLIPSE_HOME/eclipse $*

 

and finally save the file.

 

 

2.1.6 Create a gnome menu icon

To create a menu icon press Alt+F2 and type:

gksu gedit /usr/share/applications/eclipse.desktop

 

and copy paste the below code:

 

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

 

 

2.1.7 Launch Eclipse for the first time

Press Alt+F2 and type:

/opt/eclipse/eclipse -clean &

 

 

 

2.2 Python

2.2.1 Donwload Python

You can download Python from here.

 

2.2.2 Extract it

Once you download the file locate it and extract it. I assume that the downloaded file is located in /home/Downloads. Open a terminal with Ctrl+Alt+T and type 

cd ~/Downloads (With this command we change the default directory "/" to "/Downloads")

tar xzf Python-3.2.3.tgz to extract the file.

 

2.2.3 Install it

In the terminal type the following commands invidually:

 

cd Python-3.2.3

./configure

make

make test

sudo make install

 

Note: It will take some time, especially the command "make test".

Now we have Python 3.2 on our computer.

 

 

2.3 PyDev Plugin

PyDev is a Python IDE for Eclipse, which may be used in Python, Jython and IronPython development.

 

2.3.1 Donwload and Install PyDev Plugin

First open Eclipse and go to HelpInstall New Software...

 

 

In Work with: type  PyDev - http://pydev.org/updates and press tha button Add... Then check the first option PyDev and click Next

 

 

 

 

And the installation will begin.

Caution!

When you see the Selection Needed dialog box, you must manually check the box before pressing okay. If you do not, it appears that the installation is continuing, but it is not. You must uninstall PyDev, then reinstall.

 

 

And finally restart Eclipse

 

 

2.3.2 Configure PyDev

Go to Window Preferences. In the Preferences window, expand PyDev and select Interpreter-Python.

 

 

Click "New..." and type Python32 for the Interpreter name. For the Interpreter executable, browse to your copy of Python /usr/local/bin/python3.2, and press Open.

 

 

Click "OK" and the  Selection Needed Window will appear.

 

 

Select all but the PySrc and python32.zip and click OK as many times as necessary to exit the preferences.

 

 

The default selection should be fine. The Interpreter is now set up so that the code you write can be interpreted for the computer to run. You are now ready to start running code.

 

 

2.3.3 Your first Python programm in Eclipse

Select FileNewProject. Select PydevPydev Project.

 

 

Create a new project with the name "HelloWorld". Select Python version 3.0 and your interpreter Python32.Also check Create 'src' folder and add it to the PYTHONPATH?.

 

 

Press Finish.

 

Select Window Open Perspective Other. Select the PyDev perspective.

 

 

 

Select the "src" folder of your project, right-click it and select New PyDev Modul. Create a module "FirstApp".

 

 

 

Type in the source code print("hello World!")

 

 

From your menu find the Play button your model and select Run AsPython run.

 

 

You will see Hello World in your console.

 


Tags: PyDev install ubuntu eclipse indigo plugin 3.7 3.2 3 plugins pydev python
Created: 2 years ago.
Last edited: 10 months ago.
                Reviewed: 2 years ago.
Read 0 times.


转载于:https://my.oschina.net/zhangrf/blog/225254

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值