Choosing the Best Python IDE

In this article I’ll review six Python IDEs. I’m mainly interested in IDEs that are cross-platform and have strong web development support (Django, HTML templates, JavaScript, etc). Because of this, well-regarded IDEs like PyScripter and Python Tools for Visual Studio are out since they are Windows-only. The Python website maintains a full list of Python IDEs.

PyCharm

PyCharm is one of the most popular Python IDEs and deservedly so. It’s packed with features such as incredible code completion, code analysis, code navigation, top-notch Django, JavaScript, HTML, and CSS support, great debugger, and much more.

pycharm

I wrote extensively about it before, so I won’t be a bore and repeat it here. The TL;DR is “PyCharm is a great Python IDE and you should definitely check it out”.

PyCharm main shortcomings is that it can be slow and its UI looks non-native in most platforms. In all fairness, PyCharm has come a long way in terms of UI and font rendering. The following is a screenshot of PyCharm, TextMate, and Emacs, respectively. I think PyCharm compares positively with TextMate:

pycharm-font

Sometimes PyCharm does feel slow, but it’s improving in each version. The current version feels much faster than the first version. In fact, it’s a no brainer if you consider that PyCharm gives you top-notch completion, code analysis and code navigation. As a comparison, Emacs starts much faster in my computer, but completion with ropemacs is way slower and less accurate than PyCharm’s.

PyCharm has great support and bugs are fixed regularly. It has good documentation, although I wish the on-line documentation had a more modern look with shallower structure. For example, the subsection “Version Control with PyCharm” is subdivided in eight subsections that are small enough to fit in one larger and easily scrollable page. Also, it would be nice to have the documentation as a PDF file.

pycharm-documentation

WingIDE

WingIDE is a solid IDE from Wingware that has been in development since 1999. It has many advanced features such as a first-rate debugger, code intelligence, and it can be extended in Python.

WingIDE’s debugger is super powerful and allows you to set breakpoints, step through code, inspect data, debug remotely, and debug Django templates. It has support for matplotlib where the plots are updated automatically.

wingide

For web development, WingIDE supports Django, Plone, Pyramid, Google App Engine and many others.

My main criticism is that the GUI, although responsive, is unattractive, old-fashioned, and quirky.

For instance, you can’t just open an existing directory like you can with PyCharm or TextMate; you need to create a new project (Project→New Project). But WingIDE doesn’t ask for the project’s name. The project will receive a default name and you can rename it if you want (Project→Save Project). Now you can add files or an existing directory (Project→Add Existing Directory).

And when you add a directory, it’s added to the Project pane folded (that is, the files and subdirectories are hidden) by default:

image

I hate being persnickety, but the first time I imported a Django project I was staring at the screen wondering what went wrong since nothing happened. After a while a noticed the small change in the left corner.

In general you can’t discover much from the UI. There’s no explicit support for Virtualenv; we need to select the Python binary in Project→Project Properties. This is not a big deal, but if we need to set a Django Settings module we need to type it in a text box, instead of just selecting the file directly with a file dialog. And, as we all know, it’s easy to make mistakes when typing. For example, in the following screenshot the value for DJANGO_SETTINGS_MODULE is wrong. After trying to run the code I realized that it should be ${DJANGO_SITENAME}.project.settings.

image

We can see the lack of discoverability in setting custom hotkeys as well. In order to (re-)bind a command we need to check the list of commands in the manual and type it in the text box (it has completion). Again, it’s not a huge deal, but it’s nice when you can accomplish things without leaving the IDE.

wing-custom-keys

Hopefully, Wingware is aware (no pun intended) of these shortcomings and seems to be working to fix them (not needing X11 to run it on the Mac is a step on the right direction).

If you are trying WingIDE, my advice is to stick to it for a while. They UI may seen a little off at first, but it has many useful and powerful features underneath and a great support for web and scientific programming.

PyDev

PyDev is a Python IDE for Eclipse with Django support, code completion, code analysis, navigation, remote debugging, interactive console and much more. You can install it as a plugin for Eclipse or by installing LiClipse, an advanced Eclipse distribution.

eclipse-debug

Eclipse seems to be one of those things that people either love or hate. It has good ideas and even Emacs creator Richard Stallman was impressed by it. However, sometimes things in Eclipse are unnecessarily complicated. For instance, the way it imports code in a project is just moronic. I find that I need to search or look up the documentation to accomplish even the simplest task such as changing the text font. This is not PyDev’s fault and, if anything, PyDev maintainer Fabio Zadrozny deserves big kudos for making it bearable to work with Python in Eclipse.

LiClipse adds support not only for Python, but for related languages such as CoffeScript, JavaScript, Django Templates, and much more. My main criticism is that it needs more and better documentation.

If you are already sold (or stuck ;-) on the Eclipse platform, PyDev is for you. If you want to try it out but has never used Eclipse before, I suggest you get a book to get acquainted with the Eclipse way of doing things.

Komodo IDE

Komodo is an IDE for dynamic languages such as Python, PHP and Ruby. The new version has many improvements such as code refactoring, multiple selections, better UI interface, open fast dialog, and much more.

komodo

Komodo IDE is pleasant and its configurations are easy to find and change. I like the editor and font rendering. Although the new version claims to have better OS X support, it doesn’t support the cocoa textbox shortcuts by default (such as Control-A and Control-E). It doesn’t have direct support for Virtualenv, but you can pick the Python interpreter in Project→Properties.

It has some support for Django, such as syntax highlighting and code completion for templates. (Although I couldn’t get it to work properly. Other people seem to be having problems with completion as well.)

It’s a good IDE if you deal with multiple languages and don’t do much web programming. Otherwise I think PyCharm, WingIDE, and PyDev are way ahead for a more reasonable price.

Eric

Eric is an open-source IDE for Python and Ruby with the ugliest mascot I have ever seen. It scares the bejesus out of me!

It toke me a while to install it as it has zero installation instructions. I tried to install Eric 5 (for Python 3) but after failing I decided to install Eric 4 (for Python 2) instead. I followed this receipt as a guide. I installed the dependencies with homebrew and ran the install.py script:

brew install qt pyqt qscintilla2
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
sudo python install.py

Eric has a nice collection of features such as Python and Ruby debugger, code coverage, automatic code checking, Python and Ruby shell, class browser, and others. And it has features for collaborative editing (thanks to jgmitzen for pointing that out). However, to me, Eric seems more like an editor with some IDE features rather than a full-fledged IDE (not that there’s anything wrong with that).(I take that back, Eric is a full-fledged IDE, that was the caffeine talking ;-)) However, its documentation is sparse and consists of a couple of technical reports.

Eric is being actively maintained (a new version for both Eric 4 and 5 was released a few days ago) but its lack of support for Django and web programming means that I’ll pass.

IEP

IEP is an Interactive Editor for Python and not really an IDE. It may be useful for people looking for a Matlab replacement. It supports multiple Python shells simultaneously and you can program GUI toolkits such as PySide, PyQt4, wx, fltk, GTK, and Tk interactively.

iep

It’s open source and written in pure Python 3. Although it’s not a complete Python IDE, I’d love to see this level of interactivity in the other IDEs.

Conclusion

If you are looking for a full-fledged and cross-platform IDE, PyCharm, WingIDE, and PyDev are really your best choices.

Both PyCharm and WingIDE are well-priced and have personal and academic licenses, plus free licenses for classroom use and open source developers. PyDev is free and a LiClipse license is $50, which is a no-brainer if you need to work with Eclipse.

My IDE of choice is PyCharm. It is very good already and because its developers keep improving it, I have no doubt PyCharm is going to be even better in the future. In fact, they just released a new version today.

You can’t go wrong with WingIDE as well. It has outstanding features and a remarkable debugger. WingIDE developer’s know it needs some UI improvement and keep launching new versions.

I have a lot of respect for PyDev’s developer, but I can’t really stomach Eclipse; maybe it’s me. If you are into Eclipse, you should check LiClipse out as it will do a lot for you out-of-the-box.

Let me know in the comments what is your favorite IDE.

Discuss this post on Hacker News

Opt In Image
Modern Python Development with PyCharm
Become more productive with the best Python IDE

Signup to hear when the book launches.

I hate spam and will never share your email.

  • Todor

    Have you had a chance to look at Spyder?
    http://code.google.com/p/spyderlib/

    • pedrokroger

      I have, it’s pretty nice. I’ll add it to the article in the next update.

  • robsonrspeixoto

    Have you tested the PyCharm Community?

    • pedrokroger

      I haven’t because I have the Pro version. From what I understand the Community version is like the Pro version minus the advanced web features. Is that right?

    • shrek

      Yes I tried, my Laptop utilization went high, is there any light weight good editor for python?

  • Tim

    PyDev has always been a no go for me because Eclipse takes up far to much resource. I have tried many IDE’s over the years. Ninja IDE actually is pretty good. But most of the time I fall back to Boa Constructor, it seems to get in the way the least and runs fine on really low spec hardware ;-)

  • http://milliams.com/ Matt Williams

    At risk of just adding more confusion, there’s a great IDE called KDevelop which has excellent Python support. Have a look at some of the nice code completion features discussed at http://scummos.blogspot.com

    • TheBlackCat13

      Agreed, I use kdevelop myself. It is excellent.

      Further, it is nice that it is fully open-source, with no separate pro/regular feature split.

      • Eduard Sukharev

        It is, indeed. But KDevelop has just started py3 adoption and it still lacks web-ide features. The PyCharm is cool enough, but lacks most of those web-related features in community edition. Thus, either we wait for KDevelop to catch up with py3 and still don’t get the web dev support, or we buy PyCharm licence.
        For OpenSource and hobby projects KDevelop is cool enough, but if i had to chose what to use at work, i’d spent those bucks on PyCharm personal license

  • Dawid Fajkowski

    Where is Sublime?

  • mriehl

    Sublime text 3 + the Anaconda plugin. Try it, you’re never going back.

  • Jacob Peck

    Ever hear of Leo? http://leoeditor.com/

    • pedrokroger

      I haven’t, thanks for the recommendation!

      • Jacob Peck

        Full disclosure: I’m a Leo dev, and therefore biased…

        But it really is tremendously awesome. :)

        • pedrokroger

          Cool, I’ll check it out :-)

        • Julio

          Hi, do you have instructions to install on ubuntu 13.10?

        • sayth

          I am reading the website for Leo, I must admit I am unsure what it does. What would the elevator pitch be on why we should invest 5 hours learning it?

          • Jacob Peck

            That’s always been difficult to quantify, so I’ll speak from personal experience rather than a generic ‘what it does’ approach.

            Leo allows me to:
            – Organize my life neigh effortlessly (I use Leo for a personal database, a PIM, an RSS feed reader, and a document writing tool for Markdown and ConTeXt documents, aside from just a python IDE)

            – Increase productivity (I have a few scripts that let me turn Leo into my ultimate GTD tool)

            – Conceptualize and compartmentalize code (nodes are awesome)

            – Hide code that I’m not looking at/interested in at the moment (again, nodes are awesome)

            – Create unique views of code that relate to a problem (clones of nodes)

            – Intermingle documentation and code effortlessly (literate programming elevated)

            – Search through thousands of lines of code effortlessly (there are several ways to search nodes, and most of them are fast and support regexes)

            – Programmatically manipulate my code with python (use python to write python? Awesome.)

            – Explore new ways to structure data (trees are old-hat, for sure, but when you can manipulate them effortlessly, a whole new world opens up for structured data)

            – Write apps within Leo, for personal use (each outline can be it’s own app, thanks to scripting support. I’ve used Leo to run tabletop RPGs, build complex Java projects, and debug/profile a largeish python music programming project, all without leaving the Leo interface)

            It’s not for everyone, but it offers many advantages I simply haven’t found elsewhere — emacs doesn’t even come close. If any of the above sounds like things you’d like to do, I’d recommend at least going through the Leo tutorial basics… it takes a bit to capture the Leo ‘Aha’, but when it clicks, it changes you.

            Hope this helps, rather than hurts…

  • http://prologic.shortcircuit.net.au/ James Mills

    The best Python IDE: UNIX (vim+hg+syntastic+flake8+virtualenvwrapper+sphinx+…)

  • Peter

    There is http://ninja-ide.org/ as well.

  • jgmitzen

    What do you feel Eric is really missing to not make it really an IDE? As a former Delphi developer, Eric beats the Delphi IDE, and that product costs at least $1000USD!

    One somewhat unique feature you didn’t mention was the ability to chat with other developers and even share open files for collaborative editing.

    • pedrokroger

      Thanks for the comment, you are right, I take it back. Eric is, indeed an IDE. (I updated the article)

  • PAC

    Its worth a look and the Editra editor with its PyStudio plugin.

  • Andrey

    Python doesn’t need an IDE. Emacs, Vim or Sublime Text is everything you need.

    • the dude

      I hear people saying this a lot. Would you mind explaining why this is?

      • sayth

        Because you are editing text and that’s what editors do well. IDE can help but my thoughts is that would assist with a language like java.

        Can add Light-Table to that list of editors.

        • the dude

          Light-table looks really cool I’m gonna try it out!

          Alright, but why would it help for java and not python?

          • sayth

            First I ain’t a big java person python, php, javascript css etc is what I am doing.

            java generates and requires a lot of boilerplate code many ides include and manage ways of easily creating and linking this compiled code in the project and into I assume maven.

          • the dude

            Ah okay thanks. I guess I’ll stick with sublime text. Glad this is the case because I don’t particularly enjoy using bloated IDEs in the first place.

  • sayth

    I don’t use Eric ide at the moment but it does use plugins and does have django support via plugins Plugins➔Plugin Repository. I do find the interface proabbly has too many options for me.

    WingIDE I installed version 5, I just don’t like how projects are created, its just weird, create a blank project and then assign it a type should just follow normality new->project->python, or django or flask etc keep it simple.

    I use pydev only because its simple and seems to do everything, Liclipse is on in early dev so watching to see what happens.

  • K. Chris C.

    I like and use PyScripter. My needs are more limited, as I am not a
    developer, otherwise PyCharm would be good.

    I sure wish that the PyScripter people would add “code folding” to, as it can be interesting when trying to focus on one particular function or class.

  • swapnil

    You can use python on IDE as well as text editor but i agree with you as IDE can help you to major extent and make your work easier than working with text editors

    Visit here :- http://www.techomech.com/top-10-best-python-ide-windows-linux/

  • Ashish

    I find Visual Studio best as IDE for Python. You can detailed information about using Visual Studio as Python IDE @ http://ftg.heart-hackers.com/2014/05/best-ide-for-python-visual-studio.html

  • Octo Chou

    good.

  • opinionmatters

    Best to my knowledge is Anaconda IDE. It has the variable explorer, history, file explorer…just like MATLAB environment. The icons are big and easily accessible and user friendly. second best is pycham in my opinion.

  • Антон Ширяев

    Eclipse Pydev, I work with pycharm but Pydev likes me more, a lot plagins for eclipse, full customisation for my ) I can work with python, c++ at the same time. Egit provides opportunity work with Github and Bitbucket. Pycharm seem work out the box wih githab but doesn’t work with bitbucket

  • https://sdjkx.me/ Wilson

    vs2013 community edition + PTVS is also a good choice

  • Whoever

    You need to add Visual Studio Community edition to this list. It is free and cool.