You learned how to save a Python file using Windows Notepad and run it from the command line. But like I said, using Notepad is the absolute worst way to write Python programs. So what do the professionals use? Any serious Python programmer uses a Python IDE: an Integrated Development Environment. But what is the best Python IDE, for all the ones out there you can choose from?
Why use a Python IDE?
Let’s first dive into another question: why would you use an IDE at all? In general, an IDE speeds up development. The IDE will help you all the way, from setting up a project to debugging and running it. Let’s dive into some of the advantages of using an IDE.
Language support
IDE’s offer great language support:
- Autocompletion of words, speeding up development considerably
- Suggesting (based on the context) which options are available to use
- Syntax highlighting, making your code more readable
Debugging
IDE’s integrate the debugging process very well. Debugging is something that we haven’t talked about in this guide yet. Basically, it means finding errors (bugs) in your software and fixing them.
Project based workflow
IDE’s have the concept of projects. You open your project in the IDE and keep it all together in one window. The IDE will remember your project and all its settings as well.
What is The Best Python IDE?
Many people asked me: what is the best Python IDE? Although tastes differ from person to person, there are a couple of IDE’s that truly stand out. One of them stands out with head and shoulders. If you ask me, the answer to what is the best Python IDE is Visual Studio Code.
VSCode Advantages
I’ll only be telling you about VSCode in this Python tutorial. If you strongly prefer another IDE, like PyCharm, that’s OK. I won’t like you less! Just know this is not just a personal preference. I’ll give some compelling arguments for why I think it’s the best IDE to start with.
It’s truly free and Open Source
Other IDE’s are free too, but often have limited functionality compared to their paid ‘pro’ versions. VSCode is completely free, and it’s even open source. You can hack away on its source code if you want, it’s all available on GitHub.
It’s fast
Most IDE’s want to be cross-platform. Therefore, they are often built using Java. And even though Java has made a long way since its early days, it can still feel slow and sluggish. VSCode is built entirely using TypeScript. It’s less memory-hungry and feels really fast on all platforms.
It’s cross-platform
This means it works on all platforms. It’s the best Python IDE on Windows, Mac, and Linux. And it works mostly the same on all of them, reducing the learning curve when you want or need to switch platforms.
It supports many languages besides Python
Other Python-specific IDEs only support Python. But any experienced programmer knows that is not enough. For example, when you start creating websites using a Python framework like Django, you’ll also be creating HTML and CSS files.
It’s extremely convenient when your IDE can support multiple languages. With VSCode, this is no problem at all. Many web developers use VSCode primarily, so the support is excellent. VSCode also offers great support for file formats you’ll often encounter, no matter what language you write in, e.g.:
On top of all this, there are plugins for all the popular languages and platforms. E.g. Java, Kotlin, C#, Javascript, TypeScript, Dart and Flutter, etcetera.
Works well on remote locations (SSH, Windows WSL, Docker containers)
VSCode has a great extension that helps you connect to a remote environment. If you’re a fan of Windows’ Subsystem for Linux, you’re in luck: you use the native Windows VSCode program and work inside WSL. This offers a full-fledged Linux experience without leaving Windows. That’s right. You can run Linux on Windows. This extension can also connect to a Docker container.
Backed by Microsoft and many others
VSCode is built by Microsoft, meaning there’s this huge company backing it and making sure its development is professional and steady. There’s been a big shift to VSCode under developers I know personally. Also, lots of companies and individuals embraced VSCode and started creating awesome extensions for it. It has a vibrant community!