Visual Studio Code for Python

September 13, 2018

Visual Studio Code has really come a long way this past year. While it has been pretty good for JavaScript development for a while, it has really upped its game for Python and C++ as well.

Obviously, the first step in trying out VSCode yourself is to download it.

I like to manage my software packages with Homebrew on my Mac, so I'll do that here:

brew cask install visual-studio-code

Now, let's add some support for Python by adding an extension. Just tap Shift+Command+x (or click the fifth icon from the top on the left most panel) to show the "Extensions: Marketplace". Search for "python" and the first result should be the extension from Microsoft. Just install that and reload.

VS Code Screenshot

The extension not only provides syntax highlighting, it also allows you to manage which version of Python you use with different repos or directories. I switch between different versions of Python throughout the day and it definitely helps that the linter knows which version of Python I'm coding in.


I'd like to send you a weekly recap of all the articles I write as well as my take on the latest news on web development with Vue, React, Elixir/Phoenix, and others. Just fill out your email and name below!

Prev: Managing Multiple Versions of Python
Next: Should I Build My Own Deep Learning Rig?