How to install Python 3.9 using brew on Mac


If you want to install Python 3.9 using brew, you can do that using the below command,

% brew install python@3.9
Output:
==> Downloading https://ghcr.io/v2/homebrew/core/gdbm/manifests/1.20 ## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gdbm/blobs/sha256:5c3247c107bc2975dec7baecff33bde0b40d50800da0d44eae17b07d4712a27c
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:5c3247c107bc2975dec7baecff33bde0b40d50800da0d44eae17b07d4712a27c ## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/mpdecimal/manifests/2.5.1 ## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/mpdecimal/blobs/sha256:eebbc5c7e71710c848eb60b90f946aefdee1b5269c840c30b8098d6bb758500b
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:eebbc5c7e71710c848eb60b90f946aefdee1b5269c840c30b8098d6bb758500b ## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/readline/manifests/8.1 ## 100.0%
..
..
==> Installing dependencies for python@3.9: gdbm, mpdecimal, readline, sqlite and xz
==> Installing python@3.9 dependency: gdbm
==> Pouring gdbm--1.20.arm64_big_sur.bottle.tar.gz
🍺  /opt/homebrew/Cellar/gdbm/1.20: 24 files, 913.3KB
==> Installing python@3.9 dependency: mpdecimal
==> Pouring mpdecimal--2.5.1.arm64_big_sur.bottle.tar.gz
🍺  /opt/homebrew/Cellar/mpdecimal/2.5.1: 71 files, 2.2MB
==> Installing python@3.9 dependency: readline
==> Pouring readline--8.1.arm64_big_sur.bottle.tar.gz
🍺  /opt/homebrew/Cellar/readline/8.1: 48 files, 1.7MB
==> Installing python@3.9 dependency: sqlite
==> Pouring sqlite--3.36.0.arm64_big_sur.bottle.tar.gz
🍺  /opt/homebrew/Cellar/sqlite/3.36.0: 11 files, 4.3MB
==> Installing python@3.9 dependency: xz
==> Pouring xz--5.2.5.arm64_big_sur.bottle.tar.gz
🍺  /opt/homebrew/Cellar/xz/5.2.5: 95 files, 1.4MB
==> Installing python@3.9
==> Pouring python@3.9--3.9.6.arm64_big_sur.bottle.tar.gz
==> /opt/homebrew/Cellar/python@3.9/3.9.6/bin/python3 -m ensurepip
==> /opt/homebrew/Cellar/python@3.9/3.9.6/bin/python3 -m pip install -v --no-deps --no-index --upgrade --isolated --target=/opt/homebrew/lib/python3.
==> Caveats
Python has been installed as
  /opt/homebrew/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /opt/homebrew/opt/python@3.9/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /opt/homebrew/lib/python3.9/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install python-tk@3.9

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /opt/homebrew/Cellar/python@3.9/3.9.6: 3,080 files, 56.5MB
==> Caveats
==> python@3.9
Python has been installed as
  /opt/homebrew/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /opt/homebrew/opt/python@3.9/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /opt/homebrew/lib/python3.9/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install python-tk@3.9

See: https://docs.brew.sh/Homebrew-and-Python


















Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap