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

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. Python Fundamentals

Lesson 1 of 55 · Python

Installing Python and Setting Up Your Environment

Duration: 20 minutes

Installing Python and Setting Up Your Environment\n\nIn 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.\n\n## 1️⃣ Install Python\n- 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.\n- macOS: Python 3 ships with recent macOS releases. For the newest version, use Homebrew: brew install python.\n- Linux: Most distributions already include Python 3. Use your package manager, e.g., sudo apt-get install python3 python3-venv on Debian/Ubuntu.\n\n## 2️⃣ Verify the installation\npython\nimport sys\nprint('Python version:', sys.version)\n\nOr simply run python --version in a terminal.\n\n## 3️⃣ Create a virtual environment\nA virtual environment isolates third‑party packages per project.\nbash\n# From your project folder\npython -m venv .venv\n\n# Activate it (Linux/macOS)\nsource .venv/bin/activate\n\n# Activate it (Windows)\n.\\venv\\Scripts\\activate\n\nNow any pip install will affect only this environment.\n\n## 4️⃣ Install an editor\nPopular choices include VS Code, PyCharm Community, and Sublime Text. VS Code works great with the Python extension for linting, debugging, and IntelliSense.\n\nOnce you have Python and a virtual environment set up, you’re ready to start coding!\n

Next: Introduction to Python