Category: Python

Here is the step-by-step process to install Python on your system

1. Download Python

  • Visit the official Python website: https://www.python.org/downloads/.
  • Download the latest stable version of Python for your operating system (Windows, macOS, or Linux).

2. Install Python

On Windows:

  1. Run the downloaded .exe file.
  2. Check the box “Add Python to PATH” (important for running Python from the command line).
  3. Select Install Now to install Python with default settings, or choose Customize installation for advanced options.
  4. Wait for the installation to complete.

On macOS:

  1. Open the downloaded .pkg file.
  2. Follow the installation instructions and install Python on your system.
  3. macOS often comes with Python pre-installed, but you may need to install a newer version.

On Linux:

  1. Open the terminal and use your package manager to install Python:
    • Ubuntu/Debian:
sudo apt update
sudo apt install python3

Fedora:

Arch Linux:

3. Verify Python Installation

Once installed, verify the Python version to ensure it was installed correctly:

or

4. Install pip (Python Package Manager)

Pip often comes bundled with Python. To check if pip is installed, run:

If pip is missing, install it using:

python -m ensurepip --upgrade

5. Configure Environment Variables (Windows Only)

If you didn’t check “Add Python to PATH” during installation, you need to manually add Python to your system’s environment variables:

  1. Search for “Environment Variables” in the Windows search bar.
  2. Edit the Path variable under “System Variables.”
  3. Add the directory paths for Python and its Scripts folder (e.g., C:\Python39 and C:\Python39\Scripts).

6. Install a Code Editor (Optional but Recommended)

To write Python code efficiently, install a code editor like: