Як встановити Python на Mac: простий спосіб для macOS

How to Install Python on Mac: The Simple macOS Method

How to install Python on Mac is one of the first questions people run into when they want to automate tasks, learn programming, or run scripts in macOS. The safest approach is to check whether Python is already present, then install the version you need separately from macOS system components.

Check whether Python is already installed on Mac

Checking the installed Python version on Mac helps avoid duplicates and conflicts with system files. Many versions of macOS include Python, but it is not always the version needed for modern projects.

Open Terminal and enter:

  • python3 –version
  • which python3

If the system shows a version number, Python is already installed. If the command cannot find the interpreter, you need a fresh installation. After installation, the same commands should show the current version and the path to the executable.

The easiest way to install Python with the official package

Installing Python on Mac with the official installer is the best choice for a quick, predictable setup without extra configuration. It is a practical option for learning, scripts, and small projects.

  • Download the macOS Python installer from the official source.
  • Open the .pkg file and follow the standard installer steps.
  • When the process finishes, open Terminal again and run python3 –version.

If the version appears, the installation worked. If the command still fails, close and reopen Terminal, then check whether the installer completed without errors.

Install Python on Mac with Homebrew

Installing Python on Mac with Homebrew is a good fit for anyone who plans to use developer tools regularly. Homebrew makes updates easier and gives you more control over package versions.

First, make sure Homebrew is already installed. If it is, run:

  • brew install python

After the install finishes, verify it with python3 –version. It also helps to check the path with which python3 so you know which version launches by default. If the system still points to a different Python, review the PATH order in your shell profile.

What to check after installation

Checking Python after installation on Mac is important because a version number alone does not guarantee that packages and virtual environments will work correctly.

  • python3 –version confirms the installed version.
  • pip3 –version confirms that the package manager is available.
  • python3 -m venv test-env creates a virtual environment without errors.

If pip3 does not work, try updating the installation or reinstalling Python with the same method you used before. If virtual environment creation fails, check that python3 is launching the expected interpreter rather than a different system path.

Which option is better: package or Homebrew

The best way to install Python on Mac depends on how you plan to use it. The official package is better for a fast start without extra dependencies, while Homebrew is more convenient if you want easy updates and broader developer tool management.

  • Official package — simpler for beginners and learning.
  • Homebrew — more convenient for multiple tools and frequent updates.
  • System Python — avoid changing it manually if macOS depends on it.

The best setup is a separately installed Python 3 that does not conflict with macOS components. If you expect to work on projects with different versions, use virtual environments from the start.