๐Ÿ  VisualStudioTutor.com  ยท  Python Tutorial Home  ยท  Python Lesson 1 of 40
Lesson 1 of 40 Foundations Beginner โฑ 20 min

Python & VS 2026 โ€” Getting Started

Install Python 3.13, configure Visual Studio 2026, and write your first Python script. Learn the REPL, virtual environments, and project structure.

Part 1: Installing Python 3.13 & Setting Up VS 2026

Download Python 3.13 from python.org and check "Add python.exe to PATH" during install. In Visual Studio 2026, install the Python development workload.

Verify your install:
# In VS 2026 Terminal (Ctrl+backtick)
python --version # Python 3.13.x
pip --version # pip 24.x

Part 2: Your First Python Program

Create hello.py in VS 2026 and run with F5:
# hello.py
print("Hello, Python!")

# f-strings โ€” Python's string interpolation
name = "World"
print(f"Hello, {name}! Python 3.13 is here.")

# Multi-line f-string (Python 3.12+)
msg = f"""
Language: Python
Version: 3.13
"""

print(msg)

Part 3: Virtual Environments with uv

uv is the modern, fast Python package manager. Install it and create a project:
# Install uv (fast Python package manager)
pip install uv

# Create a new project
uv init myproject
cd myproject

# Add dependencies
uv add requests fastapi

# Activate (traditional venv)
python -m venv .venv
.venvScriptsactivate # Windows

Part 4: Python Project Structure

File/FolderPurpose
pyproject.tomlProject metadata & dependencies (modern standard)
src/myapp/Your package code
tests/pytest test files
.venv/Virtual environment (do not commit)
requirements.txtLegacy dependency list (use pyproject.toml instead)
๐Ÿ“˜ Want the complete guide with projects? Get the book โ†’