Best IDE for Python in 2019
If your new to Python the first thing you might ask yourself is what is the best Python IDE ? alternatively, if your anything like me, you tend to get stuck on what you know. With Microsoft recently adding Python language server support to Visual Studio Code, it felt like a good time to take a fresh look at the options.
The list of all possible tools that could be used as a Python code editor is long so I took a sample of popular favourites and excluded some more general code editors - if your looking for a Python IDE for Windows, Mac or Linux, you should be able to find the right Python IDE for you.
Microsoft Visual Studio Code
You will likely already have heard of Visual Studio given it has been around since the early days of Windows. It comes in two flavours - either Visual Studio or Visual Studio Code although Visual Studio Code is actually an entirely different product on another code base. Visual Studio Code is the free variant and essentially a light-weight cross-platform code editor that rivals the likes of Adobe Brackets. It can be a little confusing to understand the difference but Visual Studio is a full blown IDE for Windows and Mac with features such as debugging and memory profiling whilst Visual Studio Code is focused on code editing and available for Windows, Mac and Linux given its an Electron-based app.
Adding Python support is straight-forward - click the "Python" link on first-run to install Python support and your all set.
The interface is clean and light and on the left hand-side you have the project explorer (browsing files), search, source control, debugging and extension management. If you happen not to like the dark theme, it comes with around 14 themes to choose from and more can be added.
To get started, add some Python code and save the file with the .py extension to let Visual Studio Code know you are working with Python. Once saved, Lint and syntax highlighting become available and you can start running your code directly.
Code completion (or "IntelliSense") has been available for Python through Visual Studio for sometime but with the recent update, the language server is now also available for Visual Studio Code. Being server-based means it can evolve and learn and so deliver better recommendations and completion. Testing with a small project, the code suggestions and analysis feels very fast and fluid.
Visual Studio Code uses workspaces to collectively manage all the files and folders in a project. If you add a project, new features will be discovered and prompted - such as the Docker extension when it encounters a Dockerfile to enable to it to understand and build Docker images and manage local containers.
The extension marketplace is extensive and you can generally find an extension for anything.
If you are entirely new to Python then you might prefer something more Python-dedicated otherwise if you already have a long-standing favourite text editor, you should give Visual Studio Code a try.
Download link: https://code.visualstudio.com
PyCharm is developed by Jetbrains who you might be familiar with if you have ever developed with Java and their IntelliJ IDE. PyCharm is described as a "Python IDE for Professional Developers" and as this implies, it feels entirely built for Python out-of-the-box.
If you start a new project, PyCharm will automatically setup a virtual environment for you and structure a project accordingly. It has a somewhat familiar feel to IntelliJ with how it structures the workspace with libraries and dependencies in the project explorer.
PyCharm comes with everything you would expect from an IDE - debugging, source code management and code completion although some features are limited to the professional (paid) version. Note that support for Docker is limited to the professional version.
Code completion, especially if you are new to Python, can save alot of time digging through docs and PyCharm feels on-par with Visual Studio Code with its suggestions and fixes.
If you are new to Python then PyCharm could be a good choice in simplifying the setup process and getting something built for Python with no manual tweaking required. It comes with extensive support and documentation to guide you through issues. Although some features require upgrading to the paid version, the community edition is a good starting point and should provide more than enough base capabilities.
Download link: https://www.jetbrains.com/pycharm/download
Wing is an IDE dedicated to Python and comes with everything you would expect of an IDE - debugging, code completion and versioning. Its comes in 3 flavours - Wing Pro (paid), Wing Personal (free) and Wing 101 which is a simplified minimal version for beginners to learn with.
Since Wing is dedicated for Python there is no manual setup required, rather everything just works out-of-the-box. You can easily switch between your preferred Python environment and run Python scripts directly.
Worth noting is that Wing Pro includes some Django specific features and functionality - when a project is configured for Django, the project setup will be performed automatically and the virtual environment activated.
Wing lacks native support for Docker rather relying in opening a terminal within the IDE for issuing Docker commands accordingly.
The different Wing versions means it should fit from a beginner to expert alike and being designed for Python, works seamlessly with Python and Django projects.
Download link: https://www.wingware.com
Atom describes its self as "a hackable text editor for the 21st century" and is developed by the Github team. It is available for all desktop platforms with a large ecosystem of packages that can be used to customise to suit your environment. Naturally Python is well covered with some popular packages to make it fluent in Python.
The interface is clean and minimalistic and comes with a package manager to begin customising Atom. It has 4 base themes if you favour a lighter UI.
A popular choice is the ide-python package which adds Python language support. In order to run Python you will also need the Script package so some manual tweaking is required.
Docker support is available through a Docker package that provide support for composing and editing a Docker file and wraps Docker commands in a convenient and easy way.
Getting Atom setup and configured may require some Googling so it might not be the best first step for a complete new comer but once setup with your preferred mix of packages, it feels and works more like a complete IDE.
Download link: https://www.atom.io
One of the most minimal tooks on the list, IDLE is worth noting giving it ships included with Python so you can find it already in your Python path. As you might expect, its written entirely in Python.
Starting IDLE simply opens a Python shell when you can run Python snippets directly.
By opening a new file, you have a more familiar code editor with debugging and some basic code completion. IDLE has not support for projects and so is more suited to handling a few source files at a time.
IDLE is a convenient Python editor and given its minimal approach, is rather more of a useful utility than a complete development environment,
Download link: https://www.python.org
WORTH NOTING - ThonnY
Thonny is a relatively new IDE which is supported by the University of Tartu. It is described as "Python IDE for beginners" and includes Python bundled with it. As a new project, it already has a number of features including basic debugging, syntax highlighting and code completion.
The GUI is minimal and fulfills the goal of just providing the basics to a Python beginner. It is also includes a GUI around PIP (the Python package installer) to make it even easier for a newcomer.
At the time of writing, it's perhaps not something you would use for a professional project given it works with single files but rather as an interesting choice for newcomers to Python.
Download link: https://www.thonny.org
Anything else ?
Brackets.io - Brackets is developed by Adobe and as with Atom, has an extensive ecosystem of extensions through the Brackets Extension Directly. You can find extensions to customise it and better make it more Python-ready.
Download link: http://www.brackets.io
Sublime - Sublime is a commerical text editor recognised for its speed and lightweight that can be customised through some manual tweaking to make it Python-friendly.
Download link: https://www.sublimetext.com
YOU GOT YOUR IDE.. NOW WHAT ?
This is where Divio comes in - Divio will setup and configure your project for you which you can directly open in your preferred IDE. If you havent already, give us a try with a free account.