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,
- How to convert int to ASCII in Python
- How to make use of SQLite Module in Python?
- Split a String into Sub-string and Parse in Python
- Python: Pandas Rename Columns with List Example
- How to run Python file from Mac Terminal
- How to Exit a Loop in Python Code
- Python: How to Plot a Histogram using Matplotlib and data as list
- MD5 Hashing in Python
- Jupyter: Safari Cant Connect to the Server localhost:8888/tree
- Fix: AttributeError: str object has no attribute decode. Did you mean: encode?[Python]
- How to Read a binary File with Python
- How to add two float numbers in Python
- Python: How to install YAML Package
- Python: How to Save Image from URL
- What is Markdown in Jupyter Notebook with Examples
- How to change the Python Default version
- 33: Python Program to send an email vid GMail
- How to comment code in Python
- How to Fix AttributeError in Python
- Fix: error: Jupyter command `jupyter-nbconvert` not found [VSCode]
- How to comment out a block of code in Python
- List of All 35 Reserved Keywords in Python Programming Language 3.11
- Import Other Python Files Examples
- Python: How to add Progress Bar in Console with Examples
- 3 Ways to convert bytes to String in Python
More Posts:
- Android : IOException: Unable to open sync connection! - Android
- TypeError: must be str, not int [Fix Python] - Python
- Fix - E: Package python3-pip has no installation candidate - PIP
- How to Use Snipping Tool on Windows 10/11 to Take Screenshots - Windows
- scp: ssh: connect to host xxxx port 22: Connection refused Error - Linux
- Show Notepad++ tabs in multiple lines instead of scroll on tab bar - NotepadPlusPlus
- [macOS] Fix: MySQL ERROR 2002 (HY000): Cant connect to local MySQL server through socket /tmp/mysql.sock (2) - MySQL
- Notepad++ Hex Editor - NotepadPlusPlus