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
-
Have Questions? Post them here!
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:
- Save cURL Command Output to a external file - cURL
- How to use Content Assist in Eclipse IDE - Eclipse
- How to recover unsaved notepad file Windows 10 - NotepadPlusPlus
- Eclipse version 32-bit or 64-bit check on macOS - Eclipse
- [Android Studio] failed to find Build Tools revision 23.0.0 rc1 - Android-Studio
- How to customize SharePoint Modern list form using JSON formatting - SharePoint
- Comparator with Lambda Examples - Java
- Submit html form on dropdown menu value selection or change using javascript - JavaScript