In this article, we’ll list nine of the best IDEs and code editors for Python, and we’ll also explore some of the features that make each one unique.
Python is a versatile programming language that has many uses, from web development to scientific computing. When it comes to choosing an IDE or code editor for Python development, there are many options to choose from, and picking the right one can make a big difference to your workflow.
- What is Python?
- What Are IDEs and Code Editors?
- 9 Best IDEs and Code Editors for Python
- A Summary of IDE and Code Editor Features
- Final Thoughts
What is Python?
We covered this very question in detail in What Is Python and What Is It Used For?, but in brief, Python is a high-level programming language that was created in 1991 by Guido van Rossum, releasing it under an open-source license, and making it freely available to anyone who would like to use or modify the software.
Python is known for its ease of use, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C++ or Java. Some of its standout features include:
- it’s fun
- it’s a general purpose language (meaning that it allows us to do anything from building web pages to exploring data science and AI), and it’s also a multi-paradigm language (procedural, object-oriented and functional)
- you can use it on all main operating systems (Linux, Windows and macOS), and even microcontrollers
- it has a huge community of developers using it every day
- it has a large and very high quality standard library (which is why it’s often called a “batteries included” language)
- It has a great ecosystem of different libraries, tools and frameworks that help you write better code in less time — being widely used by companies like Google, Facebook and Netflix to build large-scale applications
Is Python really so easy?
Python code is often said to be almost like pseudocode, since it allows you to express very complex algorithms in very few lines of code while being very readable.
For example, here’s an implementation of the classic quicksort algorithm in Python:
def quicksort(arr): if len(arr) <= 1: return pivot = arr[len(arr) // 2] left = [x for x in arr if x < pivot] right = [x for x in arr if x > pivot] return quicksort(left) + [pivot] + quicksort(right)
What Are IDEs and Code Editors?
An IDE is a software application that provides tools for software development. A code editor is a text editor with additional features specifically designed for programming. They both offer syntax highlighting and code completion, and have plugins to add functionality. Some modern code editors even have features that are very similar to IDEs, such as debugging and refactoring.
Some developers prefer IDEs because they offer a more complete development experience. Others prefer code editors because of their lightweight nature. The following table compares their various features.
|Offer a more complete development experience, with tools for project management, debugging, and version control all built in.||Don’t offer as many features as IDEs, but often have plugins that can add functionality.|
|Can be slow and resource intensive.||Are lightweight and fast.|
|Often have a steep learning curve.||Have a shallower learning curve than most IDEs.|
As you can see, both have their own advantages and disadvantages, so it ultimately comes down to personal preference.
To learn more about IDEs and code editors, check out What Is an IDE? How Does It Enable Faster Development?
9 Best IDEs and Code Editors for Python
Why so many IDE and code editor options? It’s a reasonable question. The answer is that Python is a versatile scripting language, which means that it can be used for more than just building web applications. It’s also great for creating system scripts and automating tasks, so you’ll find that some IDEs and code editors are designed specifically with certain use cases in mind.
Here are some factors to consider:
- Do you switch from what platform to another? If so, you’ll need multi-OS support.
- Do you prefer a simple tool? You may prefer a minimalist option.
- Would you rather use a can-do-all tool? You’ll probably want extra features, just in case.
- Do you have a strong focus on code testing and quality?
- Are you specialized in data science?
- Do you only code Python, or do you use other languages as well?
- Do you care much for cutting-edge features? If not, you may just want a tool that gets the thing done.
With these questions in mind, let’s take a look at some of the best Python IDEs and code editors available today, and find some answers.
Atom, a “hackable text editor for the 21st century”, has proved quite an innovative editor, with an outstanding integration with GitHub (well, Atom is developed by GitHub), and we’ve written before on Atom Add-ons for Running Code and Previewing Changes.
Even Electron — the framework on which Atom is built — has also brought a fair amount of innovation by allowing to build desktop applications using web technologies. (More on this shortly.)
However, in mid 2022, GitHub announced:
We are archiving Atom and all projects under the Atom organization for an official sunset on December 15, 2022.
Because Microsoft acquired GitHub, it was decided to focus on further development of Atom’s rival Visual Studio Code (VS Code). That’s probably a good decision, as VS Code had already grown to be a superior option.
Visual Studio Code
VS Code, the editor that’s “free, built on open source, and runs everywhere”, is by quite a significant margin the standard for code editing in 2023. And remember the Electron framework developed by GitHub for Atom? In a somewhat ironic turn of events, VS Code is developed on top of it too!
A screenshot of the VS Code interface. Image source
A screenshot of the VS Code interface
VS Code took the dev community by storm for a good reason: it freaking rocks! Some of its features include:
For everything that Microsoft ever did wrong when it comes to supporting developers (don’t get me started), the company has managed to pull right this time around with VS Code. And its Python support is top notch!
IntelliSense and autocomplete for Python code. Image source
Tip: Check out the IntelliCode extension for VS Code (preview). IntelliCode provides a set of AI-assisted capabilities for IntelliSense in Python, such as inferring the most relevant auto-completions based on the current code context:
All of the features above are either built-in or supported by official extensions.
Jupyter notebook running in VS code in the Notebook Editor. Image source
So yes, VS Code will have all of your basic Python coding needs (and more) covered.
Visual Studio is what the .NET and C++ developers typically use to program games (among other things, of course), but it won’t add much value to your Python workflow anyway, so don’t sweat it.
Vim, “the ubiquitous text editor”, is a highly configurable text editor built to make creating and changing any kind of text very efficient. It’s included as “vi” with most UNIX systems and with macOS. Vim is rock stable and is continuously being developed to become even better.
The Vim console. Image source
Among its features are:
- it’s persistent
- it has a multi-level undo tree
- it has an extensive plugin system
- it supports hundreds of programming languages and file formats
- it has powerful search and replace (with regular expressions)
- it offers integrated diff/merge tools
Vim isn’t just an IDE. It’s more like a way of life! But even if you don’t adopt the “Vim way of life”, it can still save your bacon when you need to quickly edit something remotely over a console. Additionally, you can do everything in Vim from the command line, or you can use it within your browser using Firefox or Chrome.
But if you’re looking for Python-specific functionality, there are some great plugins available that will give you all the power you need:
- YouCompleteMe: a code-completion engine for Vim that — among other things — provides extended support for Python
- UltiSnips: a snippet solution for Vim that works quite well in conjunction with YouCompleteMe.
With PyCharm, “the Python IDE for professional developers”, we’re talking a proper graphical IDE, and we’re finally talking Python, with perks including the following:
- smart code completion
- on-the-fly error checking and quick-fixes
- easy project navigation
The PyCharm interface. Image source
PyCharm is a cross-platform IDE that works on Windows, Linux or macOS. It’s also available in both Professional (paid) and Community (free) editions. The professional edition provides an integrated toolset for Python development, including support for Django.
In more detail (quoted from the JetBrains site):
Intelligent Python Assistance: PyCharm provides smart code completion, code inspections, on-the-fly error highlighting and quick-fixes, along with automated code refactorings and rich navigation capabilities.
Web Development Frameworks: PyCharm offers great framework-specific support for modern web development frameworks such as Django, Flask, Google App Engine, Pyramid, and web2py.
Scientific Tools: PyCharm integrates with IPython Notebook, has an interactive Python console, and supports Anaconda as well as multiple scientific packages including matplotlib and NumPy.
Remote Development Capabilities: Run, debug, test, and deploy applications on remote hosts or virtual machines, with remote interpreters, an integrated ssh terminal, and Docker and Vagrant integration.
Built-in Developer Tools: A huge collection of tools out of the box: an integrated debugger and test runner; Python profiler; a built-in terminal; and integration with major VCS and built-in Database Tools.
So yes, this is serious-level Python native support. However, you should note that the Community Edition does not include many of these perks — such as VCS support, scientific tools, web development, Python web frameworks, and not even the Python profiler, remote development capabilities, or database and SQL support.
Spyder, “the scientific Python development environment”, is a cross-platform IDE that works on Windows, Linux or macOS. It’s also open-source and free to use under the MIT license.
A screenshot of the Spyder interface. Image source
Spyder is quite similar to PyCharm in many ways. They’re both Python-native IDEs with support for plugins. But Spyder has been designed specifically with data science in mind:
- IPython console, to harness the power of as many IPython consoles as you like in one GUI
- Variable explorer, to interact with and modify variables on the fly
- Plots, to browse, zoom, copy and save the figures and images you create
- Debugger, to trace each step of your code’s execution interactively
- Help, to instantly view any object’s docs, and render your own
Since Spyder uses an IPython console under the hood, you could always open up a
spyder console and use that instead of Jupyter notebooks.
And unlike with PyCharm, you get access to all of these features whether you donate to the project or not. But you might as well financially contribute to Spyder to support its development. 😁
Sublime Text is a sophisticated text editor for code, markup and prose. It’s also cross platform (Windows, macOS or Linux) and available as a paid product ($99 USD).
However, Sublime Text can be downloaded and evaluated for free. And while “a license must be purchased for continued use”, in practice there’s currently no enforced time limit for the evaluation (other than popups and regular reminders).
The Sublime Text interface. Image source
I must say that, until a few years ago, Sublime Text offered something of a premium experience, because of its neatly engineered interface and low resource consumption (there’s clearly quality product management and software engineering behind it). But boy has it lost steam against VS Code during the last five.
Sublime Text vs Visual Studio Code
Anyhow, for what it’s worth, Sublime Text does have updated support for the latest Python version:
The Sublime Text API has been updated to Python 3.8, while keeping backwards compatibility with packages built for Sublime Text 3. The API has been significantly expanded, adding features that allow plugins like LSP to work better than ever.
Speaking of well-crafted UI and IX, have you heard of Sublime Merge?
It offers a remarkable Git experience, quite superior to that of VS Code. To quote the Siblime Merge home page, it offers the following features:
A faster way to work: With a zippy cross-platform GUI toolkit, an unmatched syntax highlighting engine, and a custom high-performance Git reading library, Sublime Merge sets the bar for performance.
Precise and Flexible: Commit exactly what you want with line-by-line and hunk staging. Select one or more lines to split hunks into multiple changes.
Sublime Highlighting: With the power of Sublime Text syntax highlighting, you can understand exactly what’s been changed in a commit. With over 40 supported languages out of the box, and automatic loading of installed third-party syntaxes, we’ve got you covered.
Real Git: When you’re using Sublime Merge, you’re using Git. View the exact Git commands you’re using, and seamlessly transition between the command line and Sublime Merge.
Powerful Search: Looking for a commit? Use find-as-you-type search to find the exact commit you’re looking for.
Your Git Client: Make it yours with an adaptable layout and powerful theming system.
Well done, Sublime HQ. 👏
The PyDev interface. Image source
PyDev adds plenty of general features, and many Python-specific ones:
As you can see, there’s a lot of focus on quality assurance, so if you’re a QA specialist you might grow fond of PyDev.
PyDev on Visual Studio Code
Although PyDev is commonly used along with Eclipse, it’s now possible to leverage the features of PyDev on VS Code too!
While there are some important features to be added (such as the debugger), the current version can already leverage many features that make PyDev unique inside of Visual Studio Code!
Just add these extensions to VS Code, as pictured below.
VS Code extensions for PyDev. Image source
Thonny, the “Python IDE for beginners”, is quite a simple, extremely lightweight (~20MB), yet quite decently featured code editor/IDE for Python — and it even comes with Python 3 already built in!
Minimalist as it is, it provides a variable tracker, debugger, step-through expression evaluation, code completion — pretty much everything you’d expect in an IDE. And again, in just 20MB. Wow 🤯
A screenshot of the Thonny interface. Image source
The project is open source and hosted on GitHub.
Check out the demo!
Wing Python IDE
- Wing 101: a very simple, free Python IDE designed for teaching beginning programmers
- Wing Personal: a free Python IDE designed for students and hobbyists
- Wing Pro: a full-featured Python IDE designed for professional developers
A screenshot of the Wing IDE interface. Image source
It also sports all of what you’d expect in a IDE, but targeted at Python development:
- Intelligent editor, with context-appropriate auto-completion and documentation, inline error detection and code quality analysis, PEP 8 enforcement, invocation assistance, auto-editing, refactoring, code folding, multi-selection, customizable code snippets, and much more
- Powerful debugger, to fix bugs and write new Python code interactively.
- Easy code navigation
- Project management, to work with Python environments managed by
conda, and Docker
- Integrated unit testing, with the
pytest, and Django testing frameworks
- Remote development, to use all of Wing’s features seamlessly and securely while working on Python code running on a remote host, VM, container, or cluster
- Customizable and extensible, where new IDE features can be added by writing Python code that calls down to Wing’s scripting API
- And much more: code reformatting with Black, YAPF, and autopep8; indentation style conversion; remote development to Raspberry Pi and other ARM Linux devices
And interestingly, a number of specialized Python books have been using Wing!
A Summary of IDE and Code Editor Features
Here are all of the IDE and source code editors that we got to review:
|Type||Open Source||Free to Use||Native Python Support|
|Visual Studio Code||Editor||Yes||Yes||Partial (via extensions)|
|Visual Studio||IDE||No||Yes||Partial (via extensions)|
|Vim||Editor||Yes||Yes||Partial (via plugins)|
|Sublime Text||Editor||No||Evaluation (popups)||No|
Python is a versatile language that you can use for building a wide range of applications, and with the right IDE or code editor, you can boost your productivity and make Python development easier and more enjoyable.
If you’re just getting started with Python development (see How to Learn Programming Languages Faster), I’d recommend trying out a few of these IDEs and seeing which one works best for you. If I was hard-pressed, I’d say that PyCharm and Visual Studio Code are the best IDE and code editor for Python development, respectively. Runners up are Wing Python IDE and Sublime Text, which are a great IDE and code editor. Honorable mention goes to Vim, if you happen to be editing something remotely on a console.
Anyway, if you’re already using an IDE or code editor that you like, whichever it is, then learn it inside out! Something as simple as knowing and using all of the shortcuts that a tool offers can make a day to night difference in your workflow. So make sure you know your tool!