appendix A Installation and setup
Python’s growth in popularity means it has become more common for it to be installed on your system by default, but that isn’t always the case. And sometimes its presence on your system is a problem: some versions of macOS ship with Python but use a much earlier release. This appendix briefly outlines some of the choices you have when setting up your system and where to find more information.
A.1 Installing Python
There are several ways of getting Python onto your computer, some of which are specific to an operating system. Personally, I use https://www.python.org/, the home of Python, and download the installable packages directly. Packages are available for Windows (in 32-bit, 64-bit, and ARM64 variations), on macOS as a universal installer (both Intel and Apple silicon), and directly as source code. There is also a reference page for where to locate ports to other platforms.
Most Linux distributions include a variety of versions of Python using their built-in package managers. Building from source is also always an option.
To determine whether you have Python installed on your system and what version it is, do the following at a terminal:
$ python --version Python 3.12.2
On Windows, you can use the same command running from a PowerShell.
A.1.1 Windows installation options
- Microsoft Store package
- Windows Subsystem for Linux (WSL)