Install Python
-
A simple and complete guide to installing Python on your computer. Learn download steps, PATH configuration, and how to verify your installation and run Python for the first time.
Installing Python on Windows and macOS :
Python must be installed on your computer before you can begin writing and running programs. Most macOS and Linux systems already have Python installed, but it is recommended to install the latest version manually.
Below are complete installation instructions for both Windows and macOS.⭐ Installing Python on Windows
🔹 Step-by-Step Guide
1️⃣ Visit the Official Python Website
Open any web browser and go to the official Python download page:
👉 https://www.python.org/downloads/2️⃣ Download the Python Installer
Click on “Download Python 3.x.x for Windows” to get the latest stable version.
3️⃣ Run the Installer
Locate the downloaded .exe file and double-click it to start the installation process.
4️⃣ Important Setup Option
✅ Select “Add Python 3.x to PATH”
This ensures Python can be accessed directly from the Command Prompt (CMD).5️⃣ Choose Installation Type
Install Now → Best option for beginners
Customize Installation → Optional (select pip, documentation, or installation location)
6️⃣ Complete the Installation
Wait until the installation finishes, then click Close.
Open Command Prompt:
Win + R → cmd → Enter
python --version
🔹 If Multiple Python Versions Exist
py -V
🔹 Open IDLE / Optional VS Code Setup
🟢 IDLE (Default Python Editor)
Open the Start Menu
Search for IDLE (Python 3.x)
Click to launch the Python editor
🔵 Visual Studio Code (Recommended Editor)
Download and install Visual Studio Code from Microsoft
Open VS Code
Install the Python extension by Microsoft
Press Ctrl + Shift + P
Select Python: Select Interpreter
Choose your installed Python 3.x version
⭐ Installing Python on macOS
🔹 Download Source
Visit the official Python website: https://www.python.org
Navigate to Downloads → macOS
Download the official .pkg installer (CPython build)
🔹 Graphical Installation (Beginner-Friendly)
Double-click the downloaded .pkg file to start the installer
Follow the on-screen installation instructions
After installation, Python is typically located at:
/usr/local/bin/python3
🔹 Verify Installation (Terminal)
Open Terminal and run:
python3 --version
🔹 VS Code / IDLE on macOS
IDLE
Installed automatically. Open from Finder or run:
idle3
VS Code
Same steps as Windows:
Install Python extension
Select Python interpreter
⭐ Quick Reference Commands
🔹 Windows
python --version
py -V
🔹 macOS
python3 --version
pip3 --version