Python Installation, VS Code & Environment Setup

๐Ÿ Python 3 ๐ŸŸข Lesson 2 of 12 ๐Ÿ“‚ Phase 1: Python Basics ๐Ÿ“… 2026 Edition
Step-by-step installation guide for Windows, macOS, and Linux, configuring python in PATH, setting up VS Code with Python extension, and using Our Compiler zero-install IDE.
1How to Download and Install Python

To run Python locally on your computer, follow these steps:

  1. Visit the official website: python.org/downloads
  2. Download the latest Python 3 installer for your operating system (Windows, macOS, or Linux).
  3. IMPORTANT (Windows): During installation, check the box that says "Add Python to PATH" before clicking Install Now. If you miss this, python commands will not work in Command Prompt/PowerShell.
2Verifying Installation in Terminal
# Check Python Version $ python --version Python 3.12.x # Check Package Installer for Python (pip) $ pip --version pip 24.x.x
3Setting up VS Code (Visual Studio Code)

VS Code is the most popular editor for Python development:

  • Install VS Code from code.visualstudio.com.
  • Open Extensions (Ctrl+Shift+X) and search for Python (by Microsoft) and install it.
  • Create a new file named main.py, write your code, and click the Play โ–ถ button in the top right corner.
4Zero-Setup Option: Our Online Compiler

If you don't want to install software on your machine or you are using a mobile/tablet, you can write and run Python 3 directly in your browser with Our Compiler (online-python-compiler.html). It features Monaco Editor, dark theme, interactive inputs, and zero lag.

๐Ÿ’ป Complete Executable Code Example
# Test Your Python Environment
import sys
import platform

print("๐ŸŽ‰ Welcome to Python 3 Setup!")
print(f"System Architecture: {platform.architecture()[0]}")
print(f"Operating System: {platform.system()} {platform.release()}")
print(f"Python Executable Path: {sys.executable}")
โš ๏ธ Common Pitfall: Forgetting to check "Add Python to PATH" on Windows

If you get "python is not recognized as an internal or external command", re-run the Python installer, select "Modify", and ensure "Add Python to environment variables" is enabled.

๐Ÿ’ป Try It Yourself โ€” Hands-on Practice Challenge

Verify modules and standard paths in this interactive sandbox.

import math
import os

print("โœ… Math module loaded! Pi value:", math.pi)
print("โœ… OS Name:", os.name)
print("โœ… Environment check passed successfully!")
Run This Code in Our Online Compiler โ†’
โ“ Frequently Asked Questions (FAQ)

Q: What is pip in Python?

pip stands for "Pip Installs Packages". It is the official package management tool for installing third-party Python libraries like requests, numpy, and flask.

Q: What is virtualenv / venv?

A virtual environment creates an isolated folder on your machine for a specific project so its installed dependencies do not clash with global Python packages.

OC
Written by Our Compiler Technical Editorial Team
Reviewed for accuracy & tested on Python 3.12+ runtime ยท Last updated August 2026