How To Install Python And PIP On Mac

If you are a Mac user seeking to commence Python development, this guide will guide you through the process of installing Python and pip (the package installer for Python) on your Mac.

1. How To Check Whether Python Is Installed On MacOS Or Not.

The latest version of the Mac OS X system typically comes with Python 2 pre-installed. To verify the presence of Python in macOS, open a terminal and execute the python command. You will receive a system prompt indicating that Python 2.x is installed.

$ python
Python 2.8.1 (default, Aug 13 2019, 15:17:50) 
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.

If you want to check whether python3 is installed on Mac OS X, you can enter the python3 command in the terminal window. If the system prompts “command not found“, it means that the system has not installed python3 yet.

2. How To Install Python On MacOS.

To install Python 3 on Mac OS X, follow below steps. Go to Look for the python version that you need in the “Looking for a specific release ?” area, click the download link at the end of the version line.

It will open the download page. Scroll down to the Files section ( the end of the page ), click macOS 64-bit Universal2 installer to download the installer which is a .pkg package file.

Double click the .pkg package file to open the python installation wizard. Follow the installation wizard to install python step by step, and leave everything by default.

After installation, both python 3x and python 2x will exist on the macOS. Enter python directly in the command line window will run python 2, enter python3 in the command line window will execute python 3. You can read the article Installed Python 3 On Mac OS X But It Still Use Python 2.7 if you meet such error.

3. How To Install Pip On macOS.

You can read the article How To Install & Upgrade Pip In Cmd to learn how to install pip on macOS.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.