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
More Posts related to Python,
- Comments in Python Programming
- tkinter - Hello World! Program
- How to install Python 3.11 on Mac
- Python matplotlib segmentation fault: 11 macOS Big Sur
- Change label (text) color in tkinter
- Python Hello World! Program with code example (snippet)
- Calculate discount amount python code
- Take input argument from command line in Python Programming
- How to pip install Python Modules in VSCode
- Tkinter - add x and y padding to label text
- Python raise error with message example
- Check if String Contains a Substring - Python
- Python Program To Calculate Simple Interest (SimpleInterest.py)
- What does b prefix before a String mean in Python?
- What is Terminal Velocity and its Formula? How to calculate it programmatically?
- How to List all Packages installed using pip [Python]
- Convert Float to String in Python
- Change the background of Tkinter label or text
- How to Install Python Modules in VS Code
- Indent Python code in Notepad++
- Validate email address in Python using regular expression (regex)
- Python: Fix command not found pip or pip3 on zsh shell
- TypeError: must be str, not int [Fix Python]
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python]
- Python - Convert float to String
More Posts:
- Git Commit - Author identity unknown, Please tell me who you are email - Git
- Fix: Microsoft OneDrive We are currently experiencing technical difficulties - Microsoft
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS] - MacOS
- You're not on Teams yet, but you can set it up for your organization. [Microsoft Teams Login Error] - Microsoft
- How to create a circular Image using pure CSS Code - CSS
- auth_client_using_bad_version_title : Error Android Lint - Android
- Cannot access Windows application shortcuts on Start menu and Taskbar - Windows
- Find Covid-19 Vaccine centers on macOS or iOS Maps App - News