Skip to main content
Getting VS Code installed and properly configured takes only a few minutes. This page walks you through downloading the editor, installing it on your operating system, and adding the key extensions that turn VS Code into a fully capable Python and AI development environment.

Download and install VS Code

VS Code is available for Windows, macOS, and Linux. Visit code.visualstudio.com — the site detects your operating system automatically and shows the correct download button.
1

Download the installer

Go to code.visualstudio.com and click the download button for your platform.
2

Run the installer for your OS

  1. Run the downloaded .exe installer
  2. Accept the licence agreement
  3. On the Select Additional Tasks screen, check all of the following:
    • ✅ Add “Open with Code” to Windows Explorer file context menu
    • ✅ Add “Open with Code” to Windows Explorer directory context menu
    • ✅ Register Code as an editor for supported file types
    • ✅ Add to PATH
  4. Click Next, then Install, then Finish
The “Add to PATH” option lets you open VS Code from any terminal by typing code . — don’t skip it.
3

Verify the installation

Open VS Code. You should see the Welcome tab with a clean, modern interface. If it opens without errors, you are good to proceed.

Install the Python extension

The Python extension by Microsoft is essential — it adds syntax highlighting, IntelliSense code completion, linting, debugging, and interpreter management.
1

Open the Extensions panel

Click the Extensions icon in the left sidebar (four squares), or press Ctrl + Shift + X (Windows/Linux) / Cmd + Shift + X (macOS).
2

Search for and install Python

Search for Python, find the one published by Microsoft (millions of downloads), and click Install.
Without the Python extension, VS Code treats .py files as plain text. This extension is what enables everything Python-specific in the editor.

Install Pylance and Jupyter

While you have the Extensions panel open, install these two additional Microsoft extensions:
  • Pylance — provides significantly better type checking, code completion, and import resolution than the base Python extension alone
  • Jupyter — enables interactive Python execution and .ipynb notebook support, which you will use throughout this course
Search for each by name and click Install.
All three extensions (Python, Pylance, Jupyter) are published by Microsoft and work together. Installing them as a group now saves you from interruptions later in the course.

Enable “Execute in File Directory”

This one setting prevents a very common source of errors for beginners.
1

Open Settings

Press Ctrl + , (Windows/Linux) or Cmd + , (macOS).
2

Find the setting

Search for Python Terminal Execute In File Dir.
3

Enable it

Check the box to turn it on.
Why this matters: When VS Code runs your Python file, it will now execute from the folder where the file lives, not from your project root. This means open('data.csv') in your script will look for data.csv in the same folder as your script — which is almost always what you intend.

Verify Python is detected

After installing the Python extension:
  1. Press Ctrl + Shift + P (Windows/Linux) or Cmd + Shift + P (macOS) to open the Command Palette
  2. Type Python: Select Interpreter
  3. You should see your installed Python version listed
If no interpreter appears, your Python installation may not be on the system PATH. You will resolve this in the virtual environments section.

Optional: Customise the appearance

These appearance tweaks are optional but worth considering if you plan to spend a lot of time in the editor.

Create a workspace

Learn how to organise your Python projects in VS Code.