Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Updated November 30, 2026 · Written and reviewed under our editorial policy
To install Python on a Mac, download the latest macOS installer from python.org, open the .pkg file and follow the steps. Then double-click "Install Certificates.command" in the new Python folder in Applications, open Terminal and run python3 --version. Developers who already use Homebrew can run brew install python instead.
Source: Python documentation, "Using Python on macOS" (docs.python.org), checked 2026-11-28.
To see whether Python is already installed on your Mac, open Terminal (Applications > Utilities > Terminal) and run:
python3 --version
which python3A "Python 3.x.y" line means a Python 3 is installed, and which python3 shows where it lives. On a Mac without developer tools, python3 opens a dialog offering to install Apple's command line developer tools instead. Those tools include a python3 at /usr/bin/python3 that's fine for running a quick script, but macOS manages it: don't modify it, and install your own Python for development work. For every way to check your Python version, see our full guide.
The python.org installer is the official way to install Python on a Mac. It's a universal2 .pkg file, so the same download runs natively on Apple silicon and Intel Macs. As of November 30, 2026, the latest release on python.org is Python 3.15.2.
The installer puts a Python 3.x folder in Applications (with IDLE, a basic editor, and Python Launcher), the Python framework in /Library/Frameworks, and links for python3 and its related commands in /usr/local/bin. IDLE is enough to get started; for a full editor, compare the best Python IDEs.
Python installed? Set up Selenium for Python and run your first test on 3,000+ browsers with TestMu AI. TestMu AI (formerly LambdaTest) lets you run Python Selenium tests in the cloud without keeping browsers on your Mac.

Homebrew installs Python on a Mac with one command. Don't have Homebrew yet? First install Homebrew, then run:
brew install python
python3 --versionHomebrew's Python comes with pip. brew upgrade updates Homebrew's Python; for a new minor version, install it with brew install python@3.x (the version you need). Homebrew marks this Python as externally managed, so install packages in a virtual environment (see below) rather than with a plain pip install.
Which to choose: the python.org installer is the simplest start and matches the official documentation, while Homebrew suits developers who already manage their tools with brew. Pick one, so two installs don't compete for the python3 command.
pyenv installs several Python versions on one Mac and switches between them per project. Install it with brew install pyenv, add the shell setup lines from pyenv's README to your ~/.zshrc, then run pyenv install <version> and pyenv local <version> in a project folder (or pyenv global <version> to set a default). Most people need only one Python; reach for pyenv when different projects need different versions. Full setup steps are in the pyenv README on GitHub.
On a Mac, type python3, not python. Apple removed Python 2 in macOS Monterey 12.3, and with it the python command, and the python.org installer adds python3 rather than python. The same goes for pip: on a Mac it's usually pip3, or python3 -m pip.
If you want python to work, add alias python=python3 to your ~/.zshrc file and open a new Terminal window. Inside an activated virtual environment, python already points to that environment's Python 3.
A virtual environment keeps each project's pip packages in its own folder, so installs never touch Homebrew's or Apple's Python. Create one per project:
cd ~/projects/myapp
python3 -m venv .venv
source .venv/bin/activate
python -m pip install requests
deactivateWhile the environment is active, python and pip point into .venv; deactivate switches back. Both the python.org and Homebrew Pythons include pip; if yours doesn't, see how to install pip.
How you uninstall Python from a Mac depends on how you installed it. Never delete Apple's /usr/bin/python3: macOS manages it.
Not as a full install for development. Typing python3 on a Mac without developer tools offers to install Apple's Command Line Tools, which include a python3 that macOS manages. For your own projects, install the latest Python from python.org or with Homebrew.
Use the python.org installer if you're new to Python or want the official build. Use Homebrew if you already manage your tools with brew and want brew upgrade to update Python. Pick one, so you don't end up with two Pythons fighting over the python3 command.
macOS doesn't include a python command. Type python3 instead, or add alias python=python3 to your ~/.zshrc file.
Download and run the newest installer from python.org, or run brew upgrade if you installed with Homebrew; for a new minor version, install it with brew install python@3.x (the version you need). A new minor version from python.org installs next to the old one, which you can then remove.
It installs a set of SSL root certificates for the python.org Python, so Python can verify HTTPS websites. Without it, HTTPS requests from Python can fail with CERTIFICATE_VERIFY_FAILED errors.
KaneAI - Testing Assistant
World’s first AI-Native E2E testing agent.

TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance