Theory of Intelligence
PYTHON PROGRAMMING•Foundations•Getting Started•1.2 Installing & Running Python

1.2.1 Getting & Installing Python

Subtopics: Getting & Installing Python, Windows, macOS & Linux, PATH & Environment Variables, Interactive & Script Mode and IDEs & Editors.

1.2.1 Getting & Installing Python

Recommended Way (2026)


1. Windows

  1. Go to python.org/downloads

Add Python to PATH

  1. Click on "Download Python 3.14.5" (it usually auto-detects Windows)

  2. Download the Windows installer (64-bit) (python-3.14.5-amd64.exe)

During Installation:

  • Important: Check the box "Add python.exe to PATH" (at the bottom)

  • Click "Install Now" (recommended)

  • Or choose "Customize installation" if you want to change location

  1. Wait for installation to finish → Click Close

Verify Installation:

Open Command Prompt and type:

CMD

python --version

or

CMD

python -V

You should see Python 3.14.5


2. macOS

Method A: Official Installer (Recommended for beginners)

  1. Go to python.org/downloads

  2. Download macOS installer (python-3.14.5-macos11.pkg)

  3. Open the downloaded .pkg file and follow the installer

  4. After installation, open Terminal and run:

BASH

python3 --version

Method B: Using Homebrew (Best for developers)

BASH

# Install Homebrew first (if not installed)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"



# Install Python

brew install python


3. Linux

Ubuntu / Debian / Linux Mint

BASH

sudo apt update

sudo apt install python3 python3-pip python3-venv -y

Fedora / RHEL / Rocky Linux

BASH

sudo dnf install python3 python3-pip -y

Arch Linux / Manjaro

BASH

sudo pacman -S python python-pip

Verify:

BASH

python3 --version

pip3 --version


After Installation – Must-Do Steps

  1. Update pip (Python's package manager):
BASH

python -m pip install --upgrade pip

  1. Install virtual environment tool (highly recommended):
BASH

python -m pip install virtualenv

  1. Test Python:

Open terminal/cmd and type python (or python3 on Linux/macOS), then:

PYTHON

print("Hello, Python!")

Type exit() to quit.


Bonus Tips

  • Use VS Code as editor (best for Python)

  • Install Python extension in VS Code

  • Always use virtual environments for projects:

BASH

python -m venv myproject

# Windows: myproject\Scripts\activate

# macOS/Linux: source myproject/bin/activate

Would you like me to give you the installation steps for a specific operating system in more detail? Just tell me:

  • Windows / macOS / Linux

  • Or if you want it for Anaconda/Miniconda instead.


Step by step guide:

Pick your operating system. The steps below change when you click a button.

Step 1: Install Python

  • Go to the Python.org website Python.org downloads page showing the latest Python installer

  • Click on the download button in yellow color in the latest Python installer Python.org downloads page showing the latest Python installer

  • Follow the instructions to install Python. On the first installer screen, check Add python.exe to PATH.

Step 2: Install VS Code

  • Download a text editor or an IDE (e.g. VS Code from here) and install it
  • When you click the download button, you will be redirected to the download page
  • Download the latest version of VS Code
  • Install VS Code by following the instructions provided by the installer

Check the install

Open PowerShell and run:

POWERSHELL
python --version
python -m venv myenv
myenv\Scripts\activate

Discuss theoretical concepts, mathematical formulas, and architectural foundations.

Supports inline code with `backticks`
No comments yet. Be the first to start the discussion!