Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Installing Python and Setting U | Python Fundamentals lesson | BraveProgrammer
  1. Courses
  2. /
  3. Python Fundamentals

Lesson 1 of 55

·Python

Installing Python and Setting Up Your Environment

20 minutes

Course progress2%

What you'll learn

Keep these ideas in mind as you work through the lesson.

5 points
  • Download and install Python from the official website.
  • Add Python to your system PATH (Windows).
  • Verify the install with `python --version` or `import sys`.
  • Create and activate a virtual environment using `python -m venv`.
  • Choose an editor (VS Code recommended) and install the Python extension.

Installing Python and Setting Up Your Environment

In this lesson we’ll walk through the steps to get Python up and running on Windows, macOS, and Linux. We’ll also cover how to verify your installation and create a virtual environment to keep your project’s dependencies isolated.

1️⃣ Install Python

  • Windows: Download the installer from https://www.python.org/downloads/windows/. Run it and be sure to check Add Python to PATH before clicking Install Now.
  • macOS: Python 3 ships with recent macOS releases. For the newest version, use Homebrew: brew install python.
  • Linux: Most distributions already include Python 3. Use your package manager, e.g., sudo apt-get install python3 python3-venv on Debian/Ubuntu.

2️⃣ Verify the installation

import sys
print('Python version:', sys.version)

Or simply run python --version in a terminal.

3️⃣ Create a virtual environment

A virtual environment isolates third‑party packages per project.

# From your project folder
python -m venv .venv

# Activate it (Linux/macOS)
source .venv/bin/activate

# Activate it (Windows)
.\\venv\\Scripts\\activate

Now any pip install will affect only this environment.

4️⃣ Install an editor

Popular choices include VS Code, PyCharm Community, and Sublime Text. VS Code works great with the Python extension for linting, debugging, and IntelliSense.

Once you have Python and a virtual environment set up, you’re ready to start coding!

Make it stickPractice what you've learned1 quiz · 5 practical tests · Optional activities from Python FundamentalsBrowse activities
Continue to lesson 2Introduction to Python