The more easy way its by executing the next command:

ls -ls /usr/bin/python*

Output look like this:

/usr/bin/python           /usr/bin/python2.7        /usr/bin/pythonw
/usr/bin/python-config    /usr/bin/python2.7-config /usr/bin/pythonw2.7
Answer from Gabriel Caceres on Stack Overflow
🌐
Medium
medium.com › @akhshyganesh › find-all-python-versions-on-your-system-like-a-pro-2c4d10650035
Find All Python Versions on Your System Like a Pro | by Akhshy Ganesh | Medium
June 12, 2025 - Depending on your installation method (brew, apt, manual, etc.), the Python versions may live in slightly different neighborhoods. Here’s a tiny Python script you can run to detect common versions: import os import subprocess possible_versions = [ "python", "python2", "python3", "python3.7", "python3.8", "python3.9", "python3.10", "python3.11", "python3.12" ] found_versions = [] for version in possible_versions: try: output = subprocess.check_output([version, "--version"], stderr=subprocess.STDOUT) found_versions.append((version, output.decode().strip())) except (subprocess.CalledProcessError, FileNotFoundError): pass for name, version in found_versions: print(f"{name}: {version}")
Discussions

macos - How to find all python installations on mac os x and uninstall all but the native OS X installation - Stack Overflow
I have installed a few versions on my MacBook for different projects and have only now realized what a mistake that was. I have used homebrew to install it, installed it via python's website (Pytho... More on stackoverflow.com
🌐 stackoverflow.com
How to confirm MacOS "system" Python version - Ask Different
It doesn’t and can’t remove system files on your version of macOS even if it tried @gatorback ... @SteveM No Ventura does not come with a system Python - you get /usr/bin/python3 you have to install Xcode ... Apple removed python with Monterey 12.3. If you want a python now, you need to install the CLT, install Xcode, or install a binary distribution. Python.org, MacPorts, and Homebrew all ... More on apple.stackexchange.com
🌐 apple.stackexchange.com
December 30, 2023
Trying to understand all of my Python installations on macOS and which are necessary
So I can tell you what a few of those are: The /opt/homebrew/bin/python3 would have been installed by homebrew. So, at some point you installed homebrew and install python by it. The two /Library folder are versions of python you installed via a package from python.org. (Actually two versions). The /usr/bin/python3 is Apple's "official" version of python that gets installed with Xcode Command Lines Utilities. Which would have been installed to install homebrew Finally, the /usr/local/bin/python3 is probably a symlink to one of the Framework versions. If you do an ls -l /usr/local/bin you can see that that file is probably pointing somewhere else. As for whether you need all these, probably not. Personally I use pyenv to manage my python versions. More on reddit.com
🌐 r/learnpython
7
3
February 12, 2025
macos - What version of Python is on my Mac? - Stack Overflow
You could have multiple Python versions on your macOS. You may check that by command, type or which command, like: which -a python python2 python2.7 python3 python3.6 · Or type python in Terminal and hit Tab few times for auto completion, which is equivalent to: ... By default python/pip commands points to the first binary found in PATH environment variable depending what's actually installed... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Quora
quora.com › How-do-I-find-and-uninstall-all-versions-of-Python-on-a-Mac-OS-X
How to find and uninstall all versions of Python on a Mac OS X - Quora
However many also just rely on the default installation. ... OS junky that loves OS X. I believe it is the best Unix yet. · Author has 5.1K answers and 12.6M answer views · 7y · I am not at my mac to confirm, but I think “mdfind python” is one way (though quick, it can be too liberal in the results). Anothe way is to search the file system “find / -type f -name ‘python*’ “ which will report all files beginning with python.
🌐
Webucator
webucator.com › catalog › programming › python
How to find all your Python installations on Windows (and Mac) | Webucator
How to find all your Python installations on Windows (and Mac) (this article) Associate Python Files with IDLE · Python Virtual Environments with venv · Mapping python to Python 3 on Your Mac · Looking to improve your Python skills? Check out Webucator’s Python classes.
Top answer
1 of 2
55

It's normal to have many python binaries. You can see which is which in /usr/bin with this command:

$ ls -l /usr/bin/python*

You will see several links to different places. The native python is that one, which is in the /System/Library/Frameworks/Python.framework/Versions/2.7/bin/. Note that for OSX 10.9 (and for everything at least until 10.13) this is the python2, not python3. So you can safely remove all the other versions.

What are the other versions which you may have?

  • Something downloaded from the official site python.org. It is located in /Library/Frameworks/Python.framework/Versions/. You can remove whatever in this folder you do not want. Removing the whole folder will completely remove Python including the original system version.
  • Anaconda distribution is by default located in /Users/your_user/anaconda3/, but of course you may put in the other place. But if it contains anaconda in the path – it's Anaconda distribution. You may remove this folder.
  • Either homebrew or port versions are in /opt/local/bin/. See the link destination with $ ls -l /opt/local/bin/python*. The best way of removing this is to use built-in commands like uninstall.
  • Some packages might be in ~/Library/Python/ - that's from pip. You may safely remove the entire content of this folder in order to have a "clean" python.
  • Finally, after you removed all the other versions, do not forget to remove the broken links to binaries, if there are still any.

See also this answer.

2 of 2
8

you can start by removing any Python Frameworks in /Library/Frameworks and any User Library (like ~/Library/Frameworks). The system one is in /System/Library/Frameworks.

homebrew and macports install under /usr somewhere IIRC. not sure of other places to look, but you should be able to grep for "Python" to find them all.

be aware, if you have installed other software via homebrew that is dependent on Python, you will break it. you may be able to fix it with symbolic links to the system python, however, some software requires Python 3. as of 10.9 the system has Python 2.3-2.7 only.

🌐
CyberPanel
cyberpanel.net › blog › how-to-check-python-version
Quick Ways to Check Python Version on Mac, Windows & Linux
September 23, 2025 - And if you’re looking to build advanced projects but don’t want to manage everything yourself, you can always hire a Python developer to handle the setup and development efficiently. In the Command Prompt, type py -0. All installed Python ...
Find elsewhere
🌐
freeCodeCamp
freecodecamp.org › news › check-python-version-how-to-check-py-in-mac-windows-and-linux
Check Python Version – How to Check Py in Mac, Windows, and Linux
July 7, 2023 - To check the Python version on a Mac, you can follow these steps: You can find the terminal by navigating to "Applications" -> "Utilities" -> "Terminal", or by using Spotlight search (Cmd + Space) and typing "Terminal".
🌐
Wikihow
wikihow.com › computers and electronics › software › programming › python › how to check python version on mac, pc, linux: guide + fixes
How to Check Python Version on Mac, PC, Linux: Guide + Fixes
March 2, 2025 - Whether you're using Windows, macOS, or Linux, you can easily check your version of Python using the command python --version in PowerShell or Terminal.[1] X Expert Source · Kevin Burnett Software Developer Expert Interview If you have both ...
🌐
Reddit
reddit.com › r/learnpython › trying to understand all of my python installations on macos and which are necessary
r/learnpython on Reddit: Trying to understand all of my Python installations on macOS and which are necessary
February 12, 2025 -

Hi everyone, fairly new to python, but over time, I have accrued a few 'versions'/downloads of python on my machine and I am genuinely so confused which is necessary.

I have a macbook pro M4 running Sequoia 15.1.

Simply put, when I ask terminal, I get this:

which -a python3

/opt/homebrew/bin/python3

/Library/Frameworks/Python.framework/Versions/3.11/bin/python3

/Library/Frameworks/Python.framework/Versions/3.7/bin/python3

/usr/local/bin/python3

/usr/bin/python3

so it seems i have 5 different instances of Python on my machine? Is this normal, or is this bad practice?

I am also confused at the difference between the /library/frameworks/ versions of python versus the usr/local/bin version of Python and what this means.

🌐
Plain English
python.plainenglish.io › how-to-manage-different-python-versions-on-mac-os-11-big-sur-b285d98fdaf1
How to manage different Python Versions on Mac OS 11 Big Sur
March 19, 2021 - When you check the version of the ... you can also install Python using the pyenv install command. With the command pyenv install — list you can list all available Python version that can be installed....
🌐
SuperOps
superops.com › superops blog › blog › how to check the python version?
How to check the Python version in quick and easy steps
4 days ago - On macOS/Linux: “source ... environment directory name · Once activated, check the Python version by running “python –version” ... Multiple versions installed: Sometimes, different Python versions are installed ...
🌐
How-To Geek
howtogeek.com › home › web › how to check the python version on windows, mac, and linux
How to Check the Python Version on Windows, Mac, and Linux
October 6, 2023 - When PowerShell opens, enter the Python version command into the window: ... PowerShell will display the version of Python installed on your PC. And that's it. On your Mac, you'll use the pre-installed Terminal app to view your Python version.
Top answer
1 of 7
119

You could have multiple Python versions on your macOS.

You may check that by command, type or which command, like:

which -a python python2 python2.7 python3 python3.6

Or type python in Terminal and hit Tab few times for auto completion, which is equivalent to:

compgen -c python

By default python/pip commands points to the first binary found in PATH environment variable depending what's actually installed. So before installing Python packages with Homebrew, the default Python is installed in /usr/bin which is shipped with your macOS (e.g. Python 2.7.10 on High Sierra). Any versions found in /usr/local (such as /usr/local/bin) are provided by external packages.

It is generally advised, that when working with multiple versions, for Python 2 you may use python2/pip2 command, respectively for Python 3 you can use python3/pip3, but it depends on your configuration which commands are available.

It is also worth to mention, that since release of Homebrew 1.5.0+ (on 19 January 2018), the python formula has been upgraded to Python 3.x and a python@2 formula will be added for installing Python 2.7. Before, python formula was pointing to Python 2.

For instance, if you've installed different version via Homebrew, try the following command:

brew list python python3

or:

brew list | grep ^python

it'll show you all Python files installed with the package.

Alternatively you may use apropos or locate python command to locate more Python related files.

To check any environment variables related to Python, run:

env | grep ^PYTHON

To address your issues:

  • Error: No such keg: /usr/local/Cellar/python

    Means you don't have Python installed via Homebrew. However double check by specifying only one package at a time (like brew list python python2 python3).

  • The locate database (/var/db/locate.database) does not exist.

    Follow the advice and run:

    sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
    

    After the database is rebuild, you can use locate command.

2 of 7
49

To check third version, we can use,

python3 --version

To install python on macOS, we need to install command line developer tools. From Catalina, python is removed from OS bundle. For more information, Apple Official and Python Official.

🌐
Quora
quora.com › How-do-you-determine-which-Python-version-is-running-on-your-Mac
How to determine which Python version is running on your Mac - Quora
Use Terminal for all of them. ... python3 -V These print the version string for the named executable (e.g., "Python 3.11.4" or "Python 2.7.16"). macOS historically had a "python" pointing to Python 2; modern installs commonly use "python3".
🌐
DataCamp
datacamp.com › tutorial › check-python-version
How to Check Python Version: Windows, macOS, and Linux | DataCamp
January 28, 2026 - You can run python --version or python3 --version in the terminal to check the Python version. If you are using macOS or Linux systems, python and python3 commands often refer to separate Python installations.
🌐
Reddit
reddit.com › r/learnpython › i have two versions of python on my mac. installing modules is messy and breaks. i want to use virtual environments from now on, but how do i uninstall v.3 and the modules i'v already installed globally?
r/learnpython on Reddit: I have two versions of python on my Mac. Installing modules is messy and breaks. I want to use virtual environments from now on, but how do I uninstall v.3 and the modules I'v already installed globally?
October 17, 2021 -

I have Python 2.7.16 that came with my 2014 Macbook Pro (11.6.4 - Big Sur) and installed Python 3.7.3 before learning about sandboxing them into virtual environments.

  1. Can someone please help me clean up the v.3 install and possibly remove it along with any global modules I've installed?

  2. How can I find those modules?

  3. Is virtualenv still the best way to manage the different versions?

Additional information about my installs:

SV$ $PATH
-bash: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware: No such file or directory
SV$ which python
/usr/bin/python
SV$ which python2
/usr/bin/python2
SV$ which python3
/usr/bin/python3
SV$ which pip
/usr/local/bin/pip
SV$ which pip2
/
SV$ which pip3
/usr/bin/pip3
SV$ pip2 -V
-bash: pip2: command not found
SV$ pip3 -V
pip 19.0.3 from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
SV$ pip -V
-bash: /usr/local/bin/pip: /usr/local/opt/python/bin/python3.7: bad interpreter: No such file or directory

🌐
Alma Better
almabetter.com › bytes › articles › how-to-check-python-version
How to Check Python Version? (Linux, Windows and Mac)
January 12, 2024 - The search results will show the installed version, such as "Python 3.7 (32-bit)" or "Python 2.7 (32-bit)". Check Python Version macOS - If you are using macOS, you can check Python version by opening the terminal and entering the following command:
🌐
YouTube
youtube.com › watch
How to check all versions of Python installed on Mac | run multiple python versions using terminal - YouTube
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
Published   June 12, 2025
🌐
Enterprise DNA
blog.enterprisedna.co › how-to-check-python-version-windows-mac-linux
How to Check Python Version – Windows, Mac, Linux – Master Data Skills + AI
For macOS, go to Finder, click on Applications, choose Utilities, and then select Terminal. Step 2: Once the Terminal is open, type python –version and press Enter. The above prompt will command Python to show your current version of Python installed. If you have multiple Python versions ...