How to install Python on Mac OS - For beginners with pictures

Python Exercise Lists

Check the Python version

The latest version of Mac OS X will come with Python 2.x by default.

1. Check whether Python has installed and which version of Python has installed, by entering the python command in the Terminal window, as shown below:

$ python

If you can see the python command runs normally with the output of Python version information, which indicates that the current Mac OS X system has come with Python.

2. Key in “python3” command in the Terminal window to detect whether Python 3.x is currently installed on Mac OS X as because normally the command defaults to the Python 2.x development environment.

$ python3

If the system shows “command not found”, it means the Python 3.x has not yet installed. However, if the python3 command able to run successfully and with the version of Python, then Python 3.x has been installed.

Install Python3.x

1. Download the source code from the official website.

Python official address:

You can see various versions of Python after clicking on the link.

2. Look for the Python version that you want to install then download it.

3. Click either the Python version number or “Download” button in the figure below in order to enter the download page. Therefore, scroll to the end of the page to look for Python installation packages for each platform.

4. Click the link of macOS 64-bit installer, which is a Python installation package for Mac OS X systems. Then, you will get a installation package after downloading.

5. Double-click python-3.8.1-macosx10.9.pkg to enter the Python installation wizard, and then follow the wizard to install it step by step. You just need to keep everything in default.

Finally, we have installed Python, now you can verify again whether the installation is successful by entering python3 in the Terminal. Then you can see the command will enter the Python 3.x development environment.

$ python3


More Tutorials:

Python Installation - Linux (Ubuntu)
Python Installation - Mac OS
Integrated Development Environment - IDE
Python - Basic Variables
Python - Sequence Introduction
Python - Output Formatting
Python - Escape Character
Python - Type Conversion
Python - Numbers
Python – Arithmetic Operators
Python – Assignment Operators
Python – Comparison Operators
Python – Logical Operators
Python – Precedence and Associativity Operators
Python – Bytes Type and Usage
Python – Long & Raw Strings
Python – Concatenate Function
Python – Slice Function
Python – Length and Split Function
Python – Join and Count Function
Python – Find Function
Python – Index Function
Python – Alignment Function
Python – Startswith and Endswith Function
Python – String Case Conversion
Python – Remove Specified Character
Python – Encode and Decode Function
Python – dir and help Function
Python – Input Output Introduction
Python – Basic Operation
Python – Open Function
Python – Read Function
Python – Readline Function
Python – Write Function
Python – Close Function
Python – Seek and Tell Function
Python – Pickle Module
Python - File Input Module and Linecache Module
Python - Pathlib Module
Python - Pathlib Module
Python - os.path Module
Python - fnmatch Module
Python - Tuple Introduction
Python - List Introduction
Python - List Add Element
Python - List Delete Element
Python - List Modification Element
Python - List Find Element
Python - Dictionary Introduction
Python - Dictionary Basic Operation
Python - Dictionary Method Guide
Python - Set Collection
Python - Set Basic Operation
Python - Set Basic Method
Python - Frozenset Method
Python - If Condition I
Python - If Condition II
Python - While loop
Python - For loop
Python - Pass Statement
Python - Break Statement
Python - Zip Reverse Function
Python - Function Introduction
Python - Positional Parameters
Python - Key Arguments
Python - None and Return
Python - Variable Scope
Python - Local Function
Python - Closure Method
Python - Lamdba Expression

More Python Exercises:

Python String Exercises
Python List Exercises
Python Library Exercises
Python Sets Exercises
Python Array Exercises
Python Condition Statement Exercises