Where would we be without IDEs and code editors? Well, we’d manage, of course. Typing your code into Notepad and doing all the work yourself is entirely possible. But even for the most skilled developers, code editors and IDEs can seriously boost the comfort and efficiency of working with code. One common issue is with the 'code runner' extension in Visual Studio Code (VSCode), particularly its inability to run Python scripts correctly when using specific hotkeys. Therefore, the question arises: “Which IDE or code editor should I choose for the most optimal results?”. In this article, we’ll introduce the very best of them.
What is an IDE?
An IDE (Integrated Development Environment) is a software application used by developers for creating programs. IDEs are meant to make the developer’s job easier by combining tools that are necessary during software development. Your typical IDE will contain tools such as:
- a text editor;
- a compiler and/or interpreter, including a python compiler;
- a debugger and code profiler;
- version control integration;
- a number of supporting utilities to interface with external tooling (Docker, cloud deployments, etc.)
…all combined into a single user interface.
Many IDEs also include additional, optional features and toolkits. Some are single-language-specific, others support every language you can think of, either out of the box or through plugins.
One thing is certain: the selection is so wide that you will definitely find an IDE that can cover all your needs.
IDE vs. code editor
An IDE is a complex tool that will have your back during the entire process of software development. However, for smaller projects—or those people who would value customization above everything else—a code editor might be enough.
A code editor doesn’t have the word “integrated” in the name for a reason; it’s just an editor, with additional features like syntax highlighting and code formatting.
But code editors do have their advantages. They are more lightweight, and the more advanced editors allow you to customize your software development experience with handpicked plugins and tools. They tend to be favored by those who value customizability and don’t mind a little tweaking before they find their bliss. Configuring the 'settings' in code editors is crucial for optimal performance, especially when dealing with extensions like Code Runner in VSCode.
Some code editors are so complex and offer so many extensions that they can easily replace an IDE.
The best Python IDEs, code editors, and online Python compilers
The list we’ve assembled is based on the opinions of Python developers at STX Next (and there are over 200 of them!), as well as the popularity index according to the Stack Overflow Developer Survey and the State of Developer Ecosystem by Jetbrains. Note that the data from the Stack Overflow Survey concern the developers working with all the programming languages, while the Jetbrains and STX Next ones have only considered the opinions of Pythonistas.
As far as Python developers are concerned, PyCharm wins the popularity contest, with Visual Studio Code being the runner-up. But since IDEs and editors are highly specialized, these two may not fit your individual needs. An online editor can also be a great alternative to traditional IDEs and code editors, offering ease of use and versatility.
To help you make the difficult choice between the multiple editors, we prepared a detailed list of options, focusing on the cross-platform ones.
PyCharm
Free or paid: PyCharm has a free community edition, but its full, professional version is paid. A free trial is available. For students, there is PyCharm Educational Edition
System compatibility: Windows, macOS, Linux
Description and features: Developed by JetBrains, PyCharm is a comprehensive, Python-specific IDE.
PyCharm combines all the Python tools in one place. It offers:
- an intelligent code editor,
- navigation and refactoring tools,
- a debugger,
- a test runner.
It also allows code inspections and supports VCS. PyCharm’s code inspection is one of the most advanced among all Python IDEs, making it much harder to introduce preventable bugs through static and runtime code analysis.
The paid version additionally offers:
- a Python profiler;
- remote development;
- database tools;
- assistance in web development (by supporting frameworks like Pyramid, Flask or Django, as well as JavaScript, CoffeeScript, TypeScript, HTML/CSS, AngularJS, Node.js, and more);
- scientific tools (it integrates with IPython Notebook and supports packages like Matplotlib and NumPy).
Use it if: you’re looking for a comprehensive Python development tool that will not only make you more efficient, but also boost the quality of your code. Especially if you’re in the fields of ML/AI, data science, or web development!
Visual Studio Code
Free or paid: Visual Studio Code is free to download and open source with freeware binaries.
System compatibility: Windows, macOS, Linux
Description and features: Visual Studio Code is a complete code editor developed by Microsoft. While it has many premium features and is customizable, it has a clear and easy UX, and installing new extensions is beyond easy.
Visual Studio Code provides:
- syntax highlighting,
- bracket-matching,
- auto-indentation,
- box-selection,
- built-in support for IntelliSense code completion,
- rich semantic code understanding and navigation,
- code refactoring tools,
- a debugger.
It integrates with build and scripting tools and supports Git.
Visual Studio Code is known for its innovative features, like Live Share, which allows you to do real pair-programming remotely. Its unique architecture also made it possible for Microsoft to create a cloud-based service out of it, allowing you to leverage VS Code features wherever you are.
Visual Studio Code is extensible and customizable, letting you add more features and connect to additional services (one such extension is a Python package).
Common error messages can occur when using the Code Runner extension, often due to misconfigurations or missing dependencies. Ensuring that the Python installation is correctly included in the system's path environment variable is crucial to avoid these issues. Users often face problems related to running python files using the Code Runner extension, which can be resolved by adjusting specific settings. Troubleshooting steps for run python files include reinstalling Python, modifying settings, and ensuring the correct configuration of the extension.
Use it if: you want a light, fast editor with an easy interface and customization options. VSC features some one-of-a-kind features like the Live Share mentioned above, which you might find useful!
Sublime Text
Free or paid: Sublime Text is shareware (may be downloaded and evaluated for free, but a license must be purchased for continued use).
System compatibility: Windows, macOS, Linux
Description and features: Sublime Text is a lightweight, cross-platform code editor, known for being simple to use, fast, and easily customizable.
Sublime Text offers:
- split editing,
- syntax highlighting,
- auto-completion,
- command palette,
- “Goto” options meant to maximize your efficiency, like:
- Goto Anything (“open files with only a few keystrokes, and instantly jump to symbols, lines or words”),
- Goto Definition (which allows the editor to “automatically generate a project-wide index of every class, method and function”).
Sublime Text has a powerful Python API that guarantees easy customization with tools and packages (after getting the Package Control manager).
Use it if: you’re a non-beginner looking for a beautiful, high-performing, customizable editor that is lightweight at the same time.
Vim
Free or paid: Vim is completely free and open source.
System compatibility: macOS, Windows, Linux
Description and features: Vim is an extensible terminal-based editor.
Vim is all about configurability and, as its official website states, “it will not hold your hand.” While its entry threshold is not the lowest, your preparations will pay off. Vim is fast, effective, and 100% suited to your needs.
At its very core, Vim is a text editor equipped with all the basic features to facilitate writing code. It:
- highlights syntax,
- points out errors,
- looks for syntax matches,
- offers code completion,
- and more!
Vim is known for its simple commands, but to use this feature effectively, you have to “start Insert mode to enter text and return to Normal mode to execute commands.” This “split” model might take some time to get used to. But in the end, it makes your work faster, as you can keep both your hands on the keyboard!
The reason why Vim is so popular among Python developers is the fact that it’s highly customizable. It offers a plethora of different extensions and plugins.
Use it if: you are an experienced developer and you know what you want—or you have time to read quite a lot of guides. If your preferred way of working doesn’t include a mouse, or you do a lot of work on a remote server, Vim is the way to go.
Atom
Free or paid: Atom is free and open source.
System compatibility: Windows, macOS, Linux
Description and features: Atom is an open-source text editor known for its simple interface and wide customizability. It is available to download on a dedicated GitHub and welcomes user-made content.
Atom self-advertises as hackable. It even features packages of IDE-like features for a more comprehensive experience.
The text editor itself offers:
- smart auto-completion,
- multiple panes,
- a built-in package manager,
- a file system browser,
- a find-and-replace feature,
- an ability to work with Git and Github directly from Atom,
- an ability to share your workspace with others in real-time.
The greatest strength of Atom is the variety of packages, which can make the editor fit your needs perfectly. It offers a lot of themes and it’s easy to customize and style it. So, you can create a Python-friendly environment for yourself, enriched with whatever features you need.
Use it if: you want an open-source, fast, and customizable editor without sacrificing the aesthetics.
Jupyter Notebook
Free or paid: Jupyter Notebook is free and open source.
System compatibility: Windows, macOS, Linux, and cloud-hosted instances
Description and features: Jupyter Notebook is an open-source web app that supports multiple programming languages.
Jupyter Notebook allows creating and sharing documents that contain live code, equations, visualizations, and narrative text. Its uses include:
- data cleaning and transformation,
- numerical simulation,
- statistical modeling,
- data visualization,
- machine learning,
- and more.
There are a number of Jupyter-like platforms that you can access through the web browser without any setup on your machine. These include Azure Notebooks, Google Colab, or Watson Studio Cloud. Jupyter Notebook also supports various python modules, making it easy to write and run Python 3 code with libraries like pandas, numpy, and matplotlib.
Fun fact: some of our articles even started out as Jupyter Notebook files!
Use it if: you work in the fields of machine learning and data science, or just want a quick tool that’s always on hand for small data-crunching scripts.
Eclipse + PyDev + LiClipse
Free or paid: Eclipse, PyDev and LiClipse are free and open-source.
System compatibility: Windows, macOS, Linux
Description and features: Developed by the Eclipse Foundation, the Eclipse IDE is one of the most notable ones out there. While primarily used for Java, it is perfect for Python development when combined with PyDev. It is strongly recommended that users also install LiClipse for optimal performance.
PyDev can be used in Python, Jython, and IronPython development. It includes code editor, navigation and refactoring tools, as well as a debugger.
It also offers an interactive console and tools for code completion, code analysis, and code coverage.
With LiClipse, PyDev supports other programming and templating languages, like Django Templates, Mako, RST, C++, CoffeeScript, Dart, HTML, JavaScript, CSS, and more.
Use it if: you’re looking for an open-source, full-fledged IDE that will help improve the quality of your code, no matter the programming language used.
GNU Emacs
Free or paid: GNU Emacs is completely free and open source.
System compatibility: Windows, macOS, Linux
Description and features: Emacs is described as “the extensible, customizable, self-documenting real-time display editor.” It was developed by the GNU project founder, Richard Stallman.
GNU Emacs offers content-aware editing modes, including syntax coloring, for many file types. It has built-in documentation, full Unicode support, and a whole array of functionalities beyond text editing available through packages. One such package is elpy, which can easily turn your editor into an IDE equivalent.
Like Vim, Emacs was created with the terminal—and mouse-free operation—in mind, but it also has a graphical interface for those that want to get a more modern UI experience.
The Emacs guide promises that “all of the basic editing commands (and there are lots of them) are available no matter what you’re trying to do,” and so are “all the tools Emacs provides for opening, saving, searching and processing text.” This means that you don’t have to switch to other software while using Emacs.
It also has a clear packaging system for downloading and installing extensions.
Bonus: you can play Tetris in Emacs.
Use it if: you value minimalism, but you also want your editor to be highly extensible and allow you the freedom of choice.
Spyder
Free or paid: Spyder is free and open source.
System compatibility: Windows, macOS, Linux
Description and features: Spyder is an IDE developed by and for the people in the scientific fields. It is available through Anaconda.
It includes:
- an editor (with syntax highlighting, introspection, code completion, real-time analysis, and more);
- a debugger;
- a profiler;
- a variable explorer;
- an IPython console;
- static code analysis;
- file explorer;
- history log;
- a lot of other features that make for a comprehensive IDE.
What makes it suited for the scientific fields, though, is its built-in integration with many popular scientific packages, including NumPy, SciPy, Pandas, IPython, QtConsole, matplotlib, SymPy, and more. It is also heavily customizable thanks to third-party plugins, and can be used as a PyQt5 extension library.
Use it if: you’re in the field of machine learning or data science and you’re looking for a comprehensive tool to speed up your work and save you some time looking for libraries and tools on your own.
Thonny
Free or paid: Thonny is free and open source
System compatibility: Windows, macOS, Linux
Description and features: Thonny deserves a special mention on this list, as it’s an IDE meant for Python beginners, created with an educational purpose. It was developed by the University of Tartu, Estonia, with special help from the RaspberryPi foundation and Cybernetica AS.
Thonny has Python 3.7 already built-in, so one installation is all you need to get started. Its entire interface is clear and easy to navigate. In the code editor, the syntax errors are highlighted, and the debugger is exceptionally simple. You can also try out code completion. In addition, it works great with MicroPython
When it comes to the educational aspects, Thonny allows you to see how your programs and shell commands affect Python variables, and how Python evaluates your expressions. You can access a new window with a separate local variables table and code pointer, as well as have your scopes and references explained.
Use it if: you’re a new Pythonista and want to have additional insights into the basics of Python operation while you code.
Final thoughts
We’ve reached the end of our list of top 10 Python IDEs and text editors. Hopefully, our short descriptions helped you get an overview of the landscape.
We encourage you to read more about the editors that caught your attention on their websites, where you can find the whole documentation, and often tutorials or demonstration videos. Online Python tools offer ease of use and accessibility, making it simple to start coding without any local setup. An online Python compiler is a versatile tool for running Python code directly in your browser. The convenience of run Python online tools allows you to execute code from anywhere. Additionally, you can share Python code online easily, enhancing collaboration and learning.
And after you chose your IDE and want to get right to coding, check out our other articles about the resources that will boost your coding skills even more: