There are two ways to install Python3 on macOS 10.15 and above. The first way is to allow the macOS to prompt you to perform the install via the command line terminal invoking xcode-select and the second way is to directly download the binary installation files from Python.org. The following instructions will walk you through installing from the macOS terminal. For instructions for installing from Python.org follow the instructions here.
Installing Python3 from the macOS Terminal
- Click the spyglass/magnifying glass icon in the top right of your macOS screen to open up the Spotlight Search field.
- Type Terminal into the search field and double-click on the black terminal app icon.
- At the terminal prompt type in:
The following output will be displayed
and a dialogue will open:
Click the Install button.
- Once installed you may use the command which python3 to confirm the installed location. You may need to reference the full python3 location when writing executable scripts.
- To invoke the python3 interactive interpreter, run the following command:
The interactive python3 interpreter sill display the current version information: