Eclipse for Python Web Development on Ubuntu

Updated 14 July 2009 for Eclipse 3.5. Now using Aptana to install PyDev.

Updated 5 March 2010 for Eclipse 3.5.2 and Subversion 1.6.

Updated 20 July 2010 for Eclipse 3.6

Updated 1 August 2011 for Eclipse 3.7 and Aptana Studio 3

Overview

So, I think I’ve finally decided that I prefer Eclipse for Python Web development over NetBeans. (I prefer Wing IDE over both for straight Python development, but that’s another post.) Eclipse’s Python support, via PyDev, seems more advanced and NetBeans has some annoying issues. Eclipse also seems a bit snappier, at least on my machine (YMMV, blah blah).

Eclipse takes a bit more effort to set up, but once you’ve done it a couple times, it’s pretty straightforward. The hard part is keeping track of the links to the Eclipse update sites and remembering a few odd bits of configuration. This document gives details on installing Eclipse for Python Web development with Aptana, PyDev, and Subclipse.

The instructions here are Linux/Ubuntu-centric, but the instructions for getting to the Platform Binary–the smallest possible Eclipse download, as far as I can tell–are applicable to all platforms.

Download Eclipse

If you go to the Eclipse downloads page, you’ll see packages for Java and C++ along with some other options. If you’re doing ONLY Python development, you might wonder which version to download. These versions install cruft I don’t want or need. I finally found what I think is the smallest possible Eclipse package, the so-called Platform Runtime Library.

Install Eclipse

Extract the downloaded package: tar xvzf eclipse-platform-3.7-linux-gtk.tar.gz. I rename the resulting eclipse directory to eclipse-3.6, move it to ~/.local, and create a symlink in ~/.local/bin to the eclipse executable: ln -s ~/.local/eclipse-3.7/eclipse ~/.local/bin/eclipse

Configure Eclipse

Edit ~/.local/eclipse-3.7/eclipse.ini. Find the line containing “-vmargs”. Add a new line directly below that: -Djava.library.path=/usr/lib/jni. Save and close. Fire up Eclipse.

Install Aptana Studio

Install PyDev

PyDev is installed as part of the Apatana Studio install.

Install MercurialEclipse

Eclipse update URL: http://cbes.javaforge.com/update

4 thoughts on “Eclipse for Python Web Development on Ubuntu

  1. Note regarding 3.5: I found that the installation of Subclipse and other add-ons was different when I installed Eclipse 3.5 on a machine that had no previous Eclipse installation. On a machine that had 3.4 installed, the above instructions still applied. On a machine with no previous Eclipse install, instead of going to Help > Software Updates, I went to Help > Install New Software. From there, it’s pretty much the same, but the interface is a bit nicer.

    Also, I haven’t seen any issues running Aptana on 3.5.

  2. Can you explain the benefits of putting eclipse in ~/.local? I’ve been casting about to determine a good approach to how to organize one’s home directory, and yours is another approach. I had initially installed eclipse using synaptic, but am downloading an additional one per your instructions here. The command ‘eclipse’ still invokes the synaptic version via a script in /usr/bin… I am tempted to uninstall the synaptic version. I like the idea of having several versions of eclipse to use, each in their own directory. However, it appears the synaptic install installs dependencies… how does that factor? Also, if one installs via synaptic, does that make it easier to stay on top of updates?

  3. I had an additional question… in your scheme, does one have to manually add ~/.local/bin to the paths variable? My install of Ubuntu didn’t have a ~/.local/bin directory.

Comments are closed.