If you have installed Python on your macOS using brew and trying to locate its installed location you can make use of the following command,
mac % brew list python@3.9
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/2to3
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/2to3-3.9
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/idle3
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/idle3.9
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/pip3
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/pip3.9
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/pydoc3
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/pydoc3.9
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/python3
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/python3-config
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/python3.9
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/python3.9-config
/opt/homebrew/Cellar/python@3.9/3.9.6/bin/wheel3
/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/ (3026 files)
/opt/homebrew/Cellar/python@3.9/3.9.6/IDLE 3.app/Contents/ (8 files)
/opt/homebrew/Cellar/python@3.9/3.9.6/lib/pkgconfig/ (4 files)
/opt/homebrew/Cellar/python@3.9/3.9.6/libexec/bin/ (6 files)
/opt/homebrew/Cellar/python@3.9/3.9.6/libexec/wheel-0.36.2-py2.py3-none-any.whl
/opt/homebrew/Cellar/python@3.9/3.9.6/Python Launcher 3.app/Contents/ (16 files)
/opt/homebrew/Cellar/python@3.9/3.9.6/share/man/ (2 files)
Also when you install python you will get info about where Python got installed.
Sample logs of installing Python 3.9Python 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
Facing issues? Have Questions? Post them here! I am happy to answer!
Author Info:
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
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:
- Get HTTP Request Response Headers Safari Browser - MacOS
- 🎃 Trending, Popular Halloween hashtags for year 2020 🎃 [Facebook, Twitter, Instagram, Snapchat] - Hashtags
- Write to File in Java using BufferedWriter - Java
- Windows 365: Restore Deleted Distribution Group using Admin Center (Active Directory) - Windows
- Online XML Code Formatter (Prettify) Tool - Tools
- PowerShell: Grep Command Alternative - Select-String - Powershell
- Java: max() and min() methods java.lang.Math - Java
- How to Convert LocalDate to Date in Java 8 and Above - Java