Installing Python - Mac

Step 1: Check for Existing Python Installation

Before installing a new version of Python, it's a good idea to check if you already have Python installed on your Mac, which can sometimes be the case.

1. Open Terminal: You can find Terminal in the Applications folder under Utilities, or simply search for it using Spotlight (Cmd + Space).

2. Check Python Version: Type python --version or python3 --version and press Enter. If Python is installed, this will display the version number.

 

Step 2: Download Python

To download the latest version of Python:

1. Visit the Python Website: Open your web browser and go to the official Python website](https://www.python.org/).

2. Download Python: Click on "Downloads" and select the latest version for macOS. The website typically detects your OS and suggests the appropriate version.

 

Step 3: Install Python 

Once the download is complete:

1. Open the Installer: Locate the downloaded file (typically in the Downloads folder) and double-click on it.

2. Follow Installation Steps: The installer will guide you through the process. Make sure to select the option "Install launcher for all users" and "Add Python to PATH" if available.

3. Complete Installation: Click “Install” and enter your admin password if prompted.

 

Step 4: Verify Installation

After installation: 

1. Open Terminal Again: As in Step 1.

2. Check the Version: Type python3 --version and press Enter. This should display the newly installed Python version.

 

Step 5: Install pip (If Not Included)

pip is Python's package manager and is used to install Python packages. It usually comes with Python, but if not:

1. Download get-pip.py: Visit https://bootstrap.pypa.io/get-pip.py, and download the get-pip.py script.

2. Run the Script: In Terminal, navigate to the download location and run python3 get-pip.py.