How to install Python?

 


Here is a simple, step-by-step guide to install Python on Windows, macOS, and Linux.


Install Python on Windows

Step 1: Download Python

  1. Go to the official Python website:
    👉 https://www.python.org/downloads
  2. Click Download Python (latest version)
    Example: Download Python 3.12

Step 2: Run the Installer

  1. Open the downloaded .exe file.
  2. IMPORTANT: Tick the checkbox
    Add Python to PATH
  3. Click Install Now

Step 3: Verify Installation

  1. Open Command Prompt
  2. Type:
    python --version
    
    or
    python
    
    If Python opens, installation is successful.

Install Python on macOS

Option 1: Using Installer

  1. Visit: https://www.python.org/downloads
  2. Download macOS installer (.pkg)
  3. Run installer → follow steps
  4. Verify:
    python3 --version
    

Option 2: Using Homebrew (developers prefer this)

  1. Install Homebrew (if not installed):
    https://brew.sh
  2. Install Python:
    brew install python
    

Install Python on Linux (Ubuntu/Debian)

Python usually comes pre-installed.
To install/update:

sudo apt update
sudo apt install python3

Check version:

python3 --version

⭐ Optional (Recommended)

Install VS Code for writing Python code:

https://code.visualstudio.com/download
And install the Python extension inside VS Code.



If you tell me which device you are using (Windows laptop, Mac, Mobile, etc.), I can give you the exact steps with screenshots



🟦 1. Install Python on Windows (Detailed Guide)

Step 1: Download Python

  1. Open your browser → go to
    👉 https://www.python.org/downloads
  2. Click the big yellow button:
    Download Python 3.x.x

Step 2: Run the Installer

  1. Open the downloaded file (e.g., python-3.12.0.exe)
  2. IMPORTANT — Check this box:
    Add Python to PATH
  3. Click Customize Installation (optional but recommended)
  4. Keep everything selected → click Next
  5. Click Install

Step 3: Verify Python Installation

Open Command Prompt → type:

python --version

or

python

If it shows version number, you're done.


🟦 2. Install PIP (Python package manager)

PIP is installed automatically with Python.

Check if pip is installed:

pip --version

To upgrade pip:

python -m pip install --upgrade pip



🟦 3. Install Python on Android (Using Termux or App)

Since you use Android, here are the steps.

Method 1: Install Python using Termux (recommended)

  1. Install Termux from F-Droid (official source):
    https://f-droid.org/packages/com.termux/

  2. Open Termux and run:

    pkg update
    pkg upgrade
    pkg install python
    
  3. Check version:

    python --version
    

✔ Python is ready inside Termux.


Method 2: Use “Pydroid 3” (easy option for beginners)

  1. Open Google Play Store
  2. Search Pydroid 3 – IDE for Python
  3. Install it
  4. Open app → Python is ready to use

Pydroid includes:

  • Python interpreter
  • Code editor
  • Package installer
  • Support for many libraries

🟦 4. Install a Good Code Editor (IDE)

Recommended:

  • VS Code (Windows/Mac/Linux)
  • PyCharm Community Edition
  • Pydroid 3 (Android)

If you're on Windows, install VS Code:

  1. Download: https://code.visualstudio.com/
  2. Install
  3. Open VS Code → go to Extensions
  4. Search Python
  5. Install Microsoft’s Python extension

🟦 5. Create Your First Python Program

On Windows:

  1. Open Notepad or VS Code
  2. Type:
print("Hello, Python!")
  1. Save as hello.py
  2. Run it using command prompt:
python hello.py

🟦 6. Common Problems & Fixes

❌ Python not recognized

Solution: Add Python to PATH manually
PATH example:

C:\Users\YourName\AppData\Local\Programs\Python\Python312\

❌ pip not working

Reinstall via:

python -m ensurepip --default-pip

❌ Wrong version opens

Try:

python3
pip3

🟩 If you tell me:

✔ Which device you want to install on

(Windows laptop, Android phone, iPhone, Mac, Linux)

✔ Your version (Windows 10/11, etc.)

I can give device-specific instructions with screenshots.

Post a Comment

0 Comments