In this simple tutorial, I’m going to show you how you can install Python inside VS Code for Linux, Windows, and Mac. It’s pretty simple and straightforward.
Open Terminal in VS Code
First, open the terminal in VS Code using the following commands:
Windows or Linux: Ctrl + '
macOS: ⌘ + '
Windows
You have a few reliable methods:
- Using Windows Package Manager (winget)
winget install -e --id Python.Python.3.11 --scope machine
This installs Python 3.11 system‑wide and adds it to your PATH.
- Using Chocolatey (if installed):
choco install python
This installs the latest Python via Chocolatey and configures your PATH for you.
macOS
Using Homebrew (must have Homebrew installed):
brew install python
This will install Python 3 and make it available as python3 in your terminal.
Linux
Commands can vary by distribution:
Debian/Ubuntu-based systems:
sudo apt update
sudo apt install python3
Optionally, you can install a package like python-is-python3 to let python run Python 3 instead.
Other distros (e.g., Fedora):
sudo dnf install python3
Or use whichever package manager your distro uses to install the python3 package.
Video Tutorial
Watch on YouTube: How to Install Python in VS Code
Top comments (0)