Introduction to Python in Visual Studio 2026
Getting started with Python, installing the tools, and writing your first program.
What is Python?
Python is a high-level, interpreted programming language created by Guido van Rossum and first released in 1991. It emphasises code readability and simplicity, making it ideal for beginners while remaining powerful enough for professional software, data science, machine learning, and web development.
In 2026, Python 3.13 is the current stable release and the version we use throughout this tutorial.
Installing Python 3.13
- Visit python.org/downloads and download the Python 3.13 installer for Windows.
- Run the installer. Tick "Add Python to PATH" before clicking Install Now.
- Verify: open a Command Prompt and type
python --version. You should seePython 3.13.x.
Installing Visual Studio 2026
Visual Studio 2026 is Microsoft's flagship IDE and provides excellent Python support through its Python workload:
- Download the Visual Studio 2026 Community installer (free) from visualstudio.microsoft.com.
- In the Workloads screen, select "Python development".
- Complete the installation (approx. 2–4 GB).
Creating Your First Python Project
- Open Visual Studio 2026 and choose Create a new project.
- Search for "Python Application" and select it.
- Name your project
HelloPythonand choose a save location. - Click Create.
Your First Program
Visual Studio creates a file called HelloPython.py. Replace its contents with:
# My first Python program
print("Hello, World!")
print("Welcome to Python in Visual Studio 2026")
Press F5 (or click the green ▶ Run button). The Output window at the bottom will display:
Hello, World!
Welcome to Python in Visual Studio 2026
# print a greeting, Copilot will suggest the print statement automatically. Press Tab to accept.