Python: Installation

Python is a high-level programming language used for a wide range of applications, from data analysis to web development.

Mac/Linux Users

  • Option 1: Official installation instructions. Follow instructions on the official Python website. This is the most up-to-date and comprehensive guide to installing Python on your system.

  • Option 2: Step-by-step installation guide. Check out our installation instructions for a step-by-step guide.

Windows Users

  • Option 1: Official installation instructions. Follow instructions on the official Python website. This is the most up-to-date and comprehensive guide to installing Python on your system.

  • Option 2: Step-by-step installation guide. Check out our detailed installation instructions for a step-by-step guide.

Subsections of Python: Installation

Python: Mac/Linux

Task 1 - Install Python

  1. Open a terminal window
  2. Run the following command to install Python:
    1. sudo apt-get install python3
    2. (for Debian/Ubuntu-based systems) or
    3. brew install python3
    4. (for macOS)

Task 2 - Install pip

pip is the default package manager for Python used to install, update, and manage Python packages and dependencies.

  1. Open a terminal window
  2. Run the following command to install pip:
    1. sudo apt-get install python3-pip
    2. (for Debian/Ubuntu-based systems) or
    3. sudo easy_install pip
    4. (for macOS)

Task 3 - Verify

  1. Open a terminal window
  2. Run the following commands to verify installation:
python3 --version
pip3 -- version

or

python --version
pip --version

If you see version information, the installation was successful.

You may need multiple Python versions available on your machine, depending on the requirements of your project and the external tools and libraries required.

Python: Windows

Task 1 - Install Python (includes pip)

  1. Go to the Python download page at https://www.python.org/downloads/windows/
  2. Click the “Download Python” button for the latest version of Python
  3. Read and follow the official instructions here (things change; adapting is key!): https://docs.python.org/3/using/windows.html
  4. Run the installer file that you downloaded as an Administrator, checking both options: 
    1. The first checkbox is checked - keep it checked.
    2. Also check “Add Python to PATH” during the installation process
  5. Click “Install Now” to install Python (which will include pip)

Task 2 - Activate the New Environment

Close and reopen the command prompt or PowerShell window to activate the new environment.

Task 3 - Verify Installation

  1. Open a command prompt or PowerShell window
  2. Run the following commands to verify installation:
python3 --version
pip3 --version

or

python --version
pip --version

If you see version information, the installation was successful.