HELLO, I’M SERHAT AND THIS IS MY FANCY TITLE.

Installing Eclipse on Ubuntu 10.04 and Configuring PyDev

Eclipse is an open source community whose projects are focused on building an extensible development platform, runtimes and application frameworks for building, deploying and managing software across the entire software lifecycle. Many people know eclipse as a Java IDE but Eclipse is much more than a Java IDE. Check this for more information: https://www.eclipse.org/home/newcomers.php

Eclipse is a IDE for: Java, JavaEE, C, C++, C#, PHP, Javascript, Mobile Development, RCP & RAP, UML, Error Handling, Maven, Python, Ruby. See download page for more languages and check marketplace for plug-ins.

Installing Eclipse on Ubuntu 10.04 LTS

I'm gonna talk about the easiest way to install eclipse on ubuntu, you can find other ways like terminal installations or more like that. You can use the Ubuntu Software Manager (Applications => Ubuntu Software Manager) as the easiest way.

Type eclipse to the search box, that is placed at the right corner.

ubuntu-software-manager

Select e-clipse and Install it. I know, there is no install option at the screen, because I installed eclipse before.

The install process may take some time according as your internet connection speed and system configuration.

When the process is done, you can reach eclipse under Applications >> Programming >> Eclipse.

Installing and Configuring the PyDev Plugin

1) Launch "eclipse". When the workbench loaded, you will see the Workspace Launcher window. If not, don't care, You can open it from File -> Switch Workspace -> Other.

eclipse-workspace-launcher

You can change the path for workspace always, I have a folder on my desktop, named as Python so I choose that path. If you want to change the path after, you now the way File -> Switch Workspace -> Other.

Now, you should see the welcome screen of Eclipse IDE. Click on the arrow on the right to go to the workbench.

eclipse-workbench

Go to Help -> Install New Software. Select Add. Enter http://pydev.org/updates under Location and click OK. Back in the Available Software window, select the PyDev for Eclipse option. Do not select the PyDev Mylyn Integration.

pydev-install

Click Next, verify that PyDev is selected in the next window then select Next again. Select I accept the terms of the license agreement then select Finish. The installer will begin to download the plug-in. A window may appear asking you whether you want to install the plug-in. Select Install All. A security warning may appear asking whether you trust the software being installed click OK then ensure the correct items are selected and click yes and the instillation process will continue. When the installation is complete, you will be asked if you want to restart Eclipse. Select Yes. Now PyDev is installed succesfully on your Eclipse IDE. It's time to configure that plug-in!

Go to Window > Preferences. In the Preferences window, expand Pydev and select Interpreter-Python. Click New.

eclipse-select-interpreter

Type your interpreter name, such as python31 etc. Select the Interpreter executable, usually and by default usr/bin/python3.1. If you installed Python in a different location type it. Click OK. Selection Needed window will appear. Leave it with defaults, if you don't know what are you doing. That's it, well done you configurated your Eclipse for Python. Now lets see, what can we do in Python!

Go to Window > Open Perspective > Other and choose Pydev, then click OK. If you look at the upper right corner you will see that the perspective has changed from Java to Pydev. If it is not neccessary for you, right click on Java and select close. Select File -> New -> Project. Select Pydev -> Pydev Project.

new-pydev-project-screen

Choose python as the project type, and 3.0 as grammer version and python31 as interpreter. Make sure create default 'src' folder and add it to the pythonpath? option is selected. Click Finish. Select the project you just created and go to File → New → Pydev Module. This will launch a new Pydev Module Wizard where you should enter a name for your module and make sure it is in the right location. Leave the Package field blank and select Finish.

eclipse-new-module

Now you sould see the example1.py file in your project. Open it if eclipse doesn't open it automatic. Type some code, and run it.

run-python-project

Now you can see the print result at the console window.

print-result

A tweak for Eclipse:

We can understand the errors with highlight function of eclipse, but the line numbers can be pretty usefull for us too.

To show line numbers, right click on the bar that you can see in the next screen, and select Show Line Numbers.

eclipse-line-numbers

Cheers.