I currently develop software on a Mac Mini M2 Pro with macOS Sequoia 15.6.1. I use Homebrew to install and manage Python. Whenever i write Python that means "Python3".
Homebrew
There are many good reasons to use Homebrew to install and manage Python on a Macintosh. Google to learn more about Homebrew. The Homebrew website URL is "https://brew.sh/". Which contains information how to install and use Homebrew. Install Python using the following terminal command:
% brew install python
You can find where Homebrew installed Python using the terminal command:
% which Python3
/opt/homebrew/bin/python3
Spyder 6 IDE
To code in Python will require a text editor or Integrated Development Environment (IDE). I currently am using the Spyder 6 IDE. As a very simple example of using Spyder 6 and Python. Type the following into the Spyder 6 code pane.
Click the run button in the top Spyder 6 toolbar to execute Python and display the result in the Spyder 6 console.
Python 3.11.12 | packaged by conda-forge | (main, Apr 10 2025, 22:18:52) [Clang 18.1.8 ]
Type "copyright", "credits" or "license" for more information.
IPython 8.36.0 -- An enhanced Interactive Python. Type '?' for help.
%runfile ‘…/HelloWorld/HelloWorld.py' --wdir
Hello World!