Home > python > Eclipse with PyDev

Eclipse with PyDev

Update (20121208)
If you want a tuned up Eclipse-Pydev, try Aptana Studio.

For small scripts I use vim or Eric but for a larger project I prefer Eclipse with the PyDev Python plugin.


  • Download Eclipse. You can get the IDE for Java Developers.
  • Add the plugin PyDev using the repository http://pydev.org/updates.
  • Since the new Ubuntu 11.04 uses Python 2.7 by default, you can tell Eclipse too to use it instead of version 2.6. Go to Window -> Preferences, then Pydev -> Interpreter – Python. Remove Python 2.6 and add Python 2.7.

Now if you want to create a new Python project, choose New -> Pydev Project.


Pydev has lots of cool features. My favorites:

  • code completion (CTRL + Space)
  • Rename (Shift + Alt + R), which works through projects too! Say, you have two projects, A and B. A is a library that is used by B. If you reference A from B correctly then if you rename something in A, PyDev will rename the necessary references in B too. I find it very useful when doing refactoring and trying to find better names for functions/variables.
  • debugger (F11)
  • jump around (hold CTRL and left click with your mouse on a function name to jump to the function’s definition)

Update (20110911)
With PyDev, I get “unresolved import” errors quite often, even if the import is correct and the script runs fine. Here I found some tips how to get rid of them:

  • Click Ctrl + 1 and select “Unresolved import error”. This will hide the error.
  • Under Preferences -> PyDev -> Editor -> Code Analysis, go to the Imports tab. Change Import redefinition from “Error” to “Warning”. I don’t recommend “Ignore” because it will hide the real errors too.

For more tips, refer to this post.

  1. Ivan
    August 2, 2011 at 05:11

    Thank you for this post. It gave me the crucial hint concerning Debug with version 2.7.

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: