Python Notes
Learn how to download and install Python on Windows, macOS, and Linux step-by-step. Includes PATH setup, version verification, and troubleshooting. Python install kaise kare – Hindi mein samjhein.
Hindi: Yeh guide aapko Python install karne ka poora tarika sikhayega – Windows, Mac, aur Linux teeno platforms par. Bilkul beginners ke liye hai.
🐍 What is Python?
Python is a high-level, interpreted, general-purpose programming language created by Guido van Rossum in 1991. It is known for its simple, readable syntax that closely resembles plain English.
Hindi: Python ek programming language hai jo Guido van Rossum ne 1991 mein banai thi. Iska syntax (likhne ka tarika) bahut simple aur English jaisa hota hai, isliye beginners ke liye sabse best language hai.
| │ Creator | Guido van Rossum │ |
| │ Year | 1991 │ |
| │ Type | Interpreted, High-level, General-purpose │ |
| │ Latest Ver | Python 3.13+ (2026) │ |
| │ License | Open Source (Python Software Foundation) │ |
| │ Website | https://www.python.org │ |
Python is Used For:
- 🌐 Web Development – Django, Flask, FastAPI
- 📊 Data Science – Pandas, NumPy, Matplotlib
- 🤖 Machine Learning / AI – TensorFlow, PyTorch, scikit-learn
- 🔧 Automation / Scripting – Automate repetitive tasks
- 🎮 Game Development – Pygame
- 🔬 Scientific Computing – SciPy, Jupyter
- 🛡️ Cybersecurity – Penetration testing tools
Hindi: Python ka use web development, data science, machine learning, automation, game development aur scientific computing mein hota hai. Yeh sabse versatile language hai.
❓ Why Install Python?
Before you can write and run Python code, you need the Python interpreter installed on your computer. The interpreter reads your .py files and executes them.
Hindi: Python code chalane ke liye pehle aapko Python interpreter install karna padta hai. Interpreter aapki .py file ko padhta hai aur execute karta hai.💻 System Requirements
| Component | Minimum | Recommended |
|---|---|---|
| OS | Windows 8 / macOS 10.11 / Ubuntu 18.04 | Windows 10/11 / macOS 12+ / Ubuntu 22.04 |
| RAM | 256 MB | 2 GB+ |
| Disk Space | 100 MB | 500 MB+ |
| Internet | Required for download | Required for packages |
| Architecture | 32-bit or 64-bit | 64-bit |
Hindi: Python install karne ke liye aapke computer mein Windows 8 ya usse upar, ya macOS 10.11+, ya Ubuntu 18.04+ hona chahiye. 64-bit system recommended hai.
⬇️ Download Python
Step 1: Go to the Official Python Website
Hindi: Sabse pehle apne browser mein https://www.python.org/downloads/ open karein. Hamesha official website se hi download karein – kisi third-party site se nahi.Screenshot Description:
Step 2: Choose the Right Version
The website automatically detects your OS and shows the appropriate download button.
| Platform | File Type | Example Filename |
|---|---|---|
| Windows | .exe installer | python-3.13.0-amd64.exe |
| macOS | .pkg installer | python-3.13.0-macos11.pkg |
| Linux | Source tarball | Python-3.13.0.tgz |
Hindi: Python ki official website automatically aapka OS detect karti hai aur sahi download button dikhati hai. Windows users ko.exefile milegi, Mac users ko.pkgfile, aur Linux users ko tarball milega.
🪟 Install Python on Windows
Hindi: Windows mein Python install karne ka sabse easy tarika official .exe installer use karna hai.Step 1: Run the Installer
Double-click the downloaded .exe file. You will see this screen:
| ☑ Install launcher for all users (recommended) | ||
|---|---|---|
| ☑ Add python.exe to PATH ◄── VERY IMPORTANT |
⚠️ CRITICAL: Check "Add python.exe to PATH"
Hindi: Bahut important: "Add python.exe to PATH" checkbox ko zaroor tick karein. Agar yeh tick nahi kiya toh Command Prompt mein python command kaam nahi karega.
Step 2: Click "Install Now"
For most users, "Install Now" is the best option. It installs Python with default settings.
Step 3: Installation Complete
Hindi: Setup complete hone ke baad "Disable path length limit" option click karein (recommended), phir Close karein.
Step 4: Customize Installation (Advanced)
If you chose "Customize Installation":
Optional Features
☑ Documentation
☑ pip ◄── Package manager (must have!)
☑ tcl/tk and IDLE ◄── Python's built-in IDE
☑ Python test suite
☑ py launcher
☑ for all users
Advanced Options
☑ Install for all users
☑ Associate files with Python
☑ Create shortcuts for installed applications
☑ Add Python to environment variables ◄── Must check!
☑ Precompile standard library
Install location: C:\Python313\
🍎 Install Python on macOS
Hindi: Mac mein Python install karne ke do tarike hain: official installer ya Homebrew. Dono easy hain.
Method 1: Official Installer (Recommended for Beginners)
Step 1: Download the .pkg file from python.org
Step 2: Run the Package Installer
Step 3: Agree to License & Install
Click Continue → Agree → Install and enter your Mac password when prompted.
Method 2: Using Homebrew (Recommended for Developers)
# Step 1: Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Step 2: Install Python via Homebrew
brew install python
# Step 3: Verify
python3 --versionPython 3.13.0
Hindi: Mac mein Homebrew ek popular package manager hai. Homebrew se Python install karna developers ke liye easy rehta hai kyunki baad mein update karna bhi easy ho jaata hai.
macOS PATH Setup
# Add to ~/.zshrc or ~/.bash_profile
echo 'export PATH="/usr/local/bin/python3:$PATH"' >> ~/.zshrc
source ~/.zshrc🐧 Install Python on Linux
Hindi: Linux (Ubuntu/Debian) mein Python usually pehle se installed hoti hai, lekin latest version install karne ke liye terminal commands use karte hain.
Ubuntu / Debian
# Step 1: Update package list
sudo apt update
# Step 2: Install Python 3
sudo apt install python3 python3-pip python3-venv -y
# Step 3: Install specific version (e.g., 3.13)
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.13 python3.13-pip python3.13-venv -yReading package lists... Done Building dependency tree... Done The following additional packages will be installed: python3.13 python3.13-dev python3.13-distutils Setting up python3.13 (3.13.0-1+focal1) ...
CentOS / RHEL / Fedora
# Fedora
sudo dnf install python3 python3-pip -y
# CentOS/RHEL
sudo yum install python3 python3-pip -yArch Linux
sudo pacman -S python python-pipFrom Source (All Linux)
# Step 1: Install build dependencies
sudo apt install build-essential zlib1g-dev libncurses5-dev \
libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget -y
# Step 2: Download Python source
wget https://www.python.org/ftp/python/3.13.0/Python-3.13.0.tgz
# Step 3: Extract
tar -xf Python-3.13.0.tgz
cd Python-3.13.0
# Step 4: Configure
./configure --enable-optimizations
# Step 5: Build (this takes a few minutes)
make -j $(nproc)
# Step 6: Install
sudo make altinstallHindi: Linux mein source se install karna thoda time leta hai lekin sabse latest version milta hai. altinstall use karte hain taaki system ki default Python replace na ho.✅ Verify Installation
After installation on any platform, open your terminal/command prompt and run:
Windows – Open Command Prompt
All Platforms – Check Python Version
python --versionPython 3.13.0
Or:
python3 --versionPython 3.13.0
Check pip (Package Manager)
pip --versionpip 24.0 from C:\Python313\Lib\site-packages\pip (python 3.13)
Quick Test – Run Python Interactively
pythonPython 3.13.0 (tags/v3.13.0:60403a5, Oct 7 2025, 09:25:02) [MSC v.1941 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
>>> print("Hello, Python!")Hello, Python!
>>> 2 + 24
>>> exit()Hindi: Terminal meinpython --versiontype karke check karein ki Python install hua ya nahi. Agar version number aaye toh installation successful hai. Phirpythontype karke interactive mode mein jaayein aurprint("Hello")type karke test karein.
🛤️ Understanding PATH Variable
Hindi: PATH ek environment variable hai jo computer ko batata hai ki programs kahan dhundhe. Python ka PATH mein hona zaroori hai taaki hum kahi se bhi python command use kar sakein.| │ You type | python script.py │ |
| │ Computer looks in PATH | │ |
| │ C | \Windows\System32 │ |
| │ C | \Python313\ ◄── Found python.exe here! │ |
| │ C | \Python313\Scripts\ │ |
Manually Add Python to PATH (Windows)
If you forgot to check "Add to PATH" during installation:
| 1. Press Win + X | System |
| 4. Under "System variables" | find "Path" → Edit |
| C | \Python313\ |
| C | \Python313\Scripts\ |
| 6. Click OK | OK → OK |
Verify PATH
# Windows
where pythonC:\Python313\python.exe C:\Python313\Scripts\python.exe
# Mac/Linux
which python3/usr/local/bin/python3
🔀 Install Multiple Python Versions
Hindi: Kabhi kabhi aapko ek hi computer par multiple Python versions chahiye hoti hain – different projects ke liye. Yeh pyenv tool se kiya ja sakta hai.
Using pyenv (Mac/Linux)
3.13.0 (set by /home/user/.pyenv/version)
Using py Launcher (Windows)
Windows installer installs the py launcher which manages multiple versions:
# Run specific version
py -3.13 script.py
py -3.11 script.py
# List installed versions
py --listInstalled Pythons found by C:\WINDOWS\py.exe Launcher for Windows -V:3.13 * C:\Python313\python.exe -V:3.11 C:\Python311\python.exe
🔧 Troubleshooting Common Errors
Hindi: Installation ke baad kuch common problems aa sakti hain. Neeche inke solutions diye gaye hain.
❌ Error 1: 'python' is not recognized
Cause: Python is not added to PATH.
Fix (Windows):
| Option 1 | Reinstall Python with "Add to PATH" checked |
| Option 2 | Manually add Python to PATH (see PATH section above) |
| Option 3 | Use full path: C:\Python313\python.exe script.py |
Hindi: Yeh error tab aata hai jab Python PATH mein add nahi hota. Sabse easy fix hai Python ko reinstall karna aur is baar "Add python.exe to PATH" checkbox zaroor tick karna.
❌ Error 2: Permission Denied (Linux/Mac)
Fix:
# Give execute permission
chmod +x /usr/bin/python3
# Or install for current user only
sudo apt install python3❌ Error 3: SSL Certificate Error
Fix (Windows):
Fix (Linux):
sudo apt install libssl-dev
# Then recompile Python from source❌ Error 4: Multiple Python Versions Conflict
Fix:
# Always use python3 explicitly
python3 script.py
pip3 install package
# Or create an alias
echo "alias python=python3" >> ~/.bashrc
echo "alias pip=pip3" >> ~/.bashrc
source ~/.bashrcHindi: Agar aapke system mein Python 2 aur Python 3 dono installed hain, toh python3 command explicitly use karein confusion se bachne ke liye.❌ Error 5: pip Not Found
Fix:
# Method 1: Use python -m pip
python -m pip install package_name
# Method 2: Reinstall pip
python -m ensurepip --upgrade
# Method 3: Download get-pip.py
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py❌ Error 6: Python Installation Hangs/Freezes
Cause: Antivirus blocking installer, corrupted download.
Fix:
❌ Error 7: Wrong Architecture (32-bit vs 64-bit)
Fix:
| 1. Check your Windows: Settings | System → About → System Type |
| 2. If "64-bit OS" | download python-3.13.0-amd64.exe |
| 3. If "32-bit OS" | download python-3.13.0.exe (without amd64) |
📊 Platform-wise Installation Summary
| Platform | Method | Command | Notes |
|---|---|---|---|
| Windows 10 | .exe installer | (GUI) | Check PATH box! |
| Windows 11 | .exe installer | (GUI) | Check PATH box! |
| macOS | .pkg installer | (GUI) | Or use Homebrew |
| macOS | Homebrew | brew i.. | brew install py.. |
| Ubuntu | apt | apt install | sudo required |
| Fedora | dnf | dnf install | sudo required |
| Arch | pacman | pacman -S | sudo required |
| All Linux | Source | make/build | Most flexible |
🧪 Post-Installation Test
Run this complete test script to verify everything works:
# python_test.py
import sys
import os
import platform
print("=" * 50)
print("PYTHON INSTALLATION TEST")
print("=" * 50)
# Python version
print(f"Python Version : {sys.version}")
print(f"Python Path : {sys.executable}")
print(f"Platform : {platform.system()} {platform.release()}")
print(f"Architecture : {platform.machine()}")
# Check pip
try:
import pip
print(f"pip Version : {pip.__version__}")
except ImportError:
print("pip : NOT FOUND")
# Check standard library
import json, os, math, datetime
print(f"\nStandard Library: ✅ Working")
print(f"Current Date : {datetime.date.today()}")
print(f"Math Pi : {math.pi:.5f}")
print("\n✅ Python is installed correctly!")
print("=" * 50)================================================== PYTHON INSTALLATION TEST ================================================== Python Version : 3.13.0 (tags/v3.13.0:60403a5, Oct 7 2025) Python Path : C:\Python313\python.exe Platform : Windows 11 Architecture : AMD64 pip Version : 24.0 Standard Library: ✅ Working Current Date : 2026-06-12 Math Pi : 3.14159 ✅ Python is installed correctly! ==================================================
Hindi: Yeh test script run karke confirm karein ki Python sahi se install hua hai. Agar "Python is installed correctly!" message aaye toh sab theek hai!
🚀 Summary & Next Steps
Congratulations! You have successfully installed Python on your system.
What's Next?
| Step | Topic | File |
|---|---|---|
| 2 | Install VS Code | install-vscode.mdx |
| 3 | Python IDLE | python-idle.mdx |
| 4 | First Python Program | first-python-program.mdx |
| 5 | Environment Setup | python-environment-setup.mdx |
Hindi: Python install ho gaya! Ab agle step mein VS Code install karein jo ek powerful code editor hai. Phir hum apna pehla Python program likhenge!
📚 Additional Resources
- 🌐 Python Official Documentation
- 📦 PyPI – Python Package Index
- 🎓 Python Tutorial for Beginners
- 💬 Python Community Forum
- 🐛 Python Bug Tracker
*Last Updated: June 12, 2026 | Author: WohoTech | Category: Python Setup*
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for How to Install Python on Windows, Mac & Linux – Complete Guide 2026.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Python Master Course topic.
Search Terms
python-master-course, python master course, python, master, course, setup, install, how to install python on windows, mac & linux – complete guide 2026
Related Python Master Course Topics