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!
- tkinter - Hello World! Program
- How to install Python Specific version (3.8, 3.9 or 3.10) using Brew
- How to install SpaCy (NLP Library) on Mac
- Python matplotlib segmentation fault: 11 macOS Big Sur
- How to uninstall pip Python packages
- 3 Ways to find if element is present in a List in Python
- How to Convert Python String to DateTime Object
- Python f-strings Formatted String Literals Syntax and Examples
- Where does brew install python in macOS
- Take input argument from command line in Python Programming
- Advanced print() Function Tutorial and Techniques for Python Developers
- How to add borders to tkinter label text
- Whats new in Python 3.10 Pre-release
- Float built-in function in Python
- List of All 35 Reserved Keywords in Python Programming Language 3.11
- How to check if Key Exists in Python Dictionary?
- Read a file line by line in Python Program
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python]
- What is the Max and Minimum Value of int type in Python?
- What is Terminal Velocity and its Formula? How to calculate it programmatically?
- Fix: TypeError: can only concatenate str (not int) to str in Python
- How to take user input from the console in a Python program
- [Fix] TypeError: str object is not callable in Python
- 3 Python program to add two numbers
- How to delete a file using Python code example
- PHP Code for sending Emails - PHP
- Python Hello World! Program with code example (snippet) - Python
- Java: Convert Stream to List - Java
- Android : Error in http connection java.net.SocketException: Permission denied - Android
- Java 8+ get Day of the Week Examples with LocalDateTime, DateTime, ZonalDateTime and Instant classes - Java
- Create SharePoint list from Excel spreadsheet and import table - SharePoint
- 100+ Hashtags for BST ARMY - BTS
- appcompat_v7 errors after updates to API level 21 Material Theme - Android