How To Install Python And PIP On Mac

If you’re a Mac user looking to get started with Python development, this guide will walk 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.

  1. The latest version of the Mac OS X system usually has Python 2 installed.
  2. To check whether python is installed in the macOS system or not, start a terminal and enter the python command in the terminal window of the system, and you will see the system prompt that python 2.x has been 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.
    >>>
  3. 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.

  1. To install Python 3 on Mac OS X, follow below steps.
  2. Go to https://www.python.org/downloads/. 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.
  3. 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.
  4. Double click the .pkg package file to open the python installation wizard.
  5. Follow the installation wizard to install python step by step, and leave everything by default.
  6. After installation, both python 3x and python 2x will exist on the macOS.
  7. Enter python directly in the command line window will run python 2, enter python3 in the command line window will execute python 3.
  8. 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.

  1. 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.