You already have Visual Studio Code. Now you need the program that will actually run Python code. In this step, you will install Python on Windows and check that your computer can find it.
What you will finish: when this article is complete, a Windows terminal will print your installed Python version.
1. Open the Official Python Download Page
Open the official Python website and go to the Downloads section. On current Windows versions, Python recommends the Python Install Manager. This replaces the older installation flow that many tutorials still show.
Download the Windows Python Install Manager from the official Python website. If Windows offers the Microsoft Store version instead, that is also an official option.
2. Install the Python Install Manager
Open the downloaded installer. Windows may show a security or installation dialog. Confirm that the publisher is Python Software Foundation, then continue with the installation.
You do not need to choose advanced options for this Alphesta lab. Our goal is to build a simple working environment first.
After the install finishes, close the installer.
3. Open a New Command Prompt
Press the Windows key, type cmd, and open Command Prompt. Use a new terminal window so that Windows can load the newly installed commands.
Type:
python
If this is the first Python runtime on your computer, the Python Install Manager may download and install the current default Python runtime. Let that process finish.
If you see the Python prompt beginning with >>>, Python is running.
Type the following to leave the interactive prompt:
exit()
4. Check Your Result
In Command Prompt, type:
python --version
You should see a result similar to:
Python 3.x.x
The exact version number may be different. That is fine.
The important result is that Windows recognizes the python command
and prints a Python 3 version.
One Common Problem: “python” Does Not Work
First, close Command Prompt completely and open a new one. Then try the version check again.
If python --version still does not work, try:
py --version
The Python Install Manager normally provides both python and py.
We will keep the troubleshooting simple here. More complicated PATH problems can be handled
separately if they appear.
What You Just Built
Visual Studio Code is your workspace. Python is the engine that runs the code. In the next step, we will connect the two so that VS Code knows which Python installation to use.
Source note: Installation steps are based on the current official Python documentation for Windows. Python's Windows installation process can change, so use the current official download page if a screen looks different.