This one will solve all your problems not only on Mac but to find it on Linux also ( & every basic shell).

TL;DR (you don't have to go through all the answer - just the 1st half).
LET'S GO

Run in terminal:

which python3

On Mac you should get:

/usr/local/bin/python3

WAIT!!! It's prob a symbolic link, how do you know? Run:

ls -al /usr/local/bin/python3 

and you'll get (if you've installed Python w/ Brew):

/usr/local/bin/python3 -> /usr/local/Cellar/python/3.6.4_4/bin/python3

which means that your

/usr/local/bin/python3 

is actually pointing to (the real location)

/usr/local/Cellar/python/3.6.4_4/bin/python3

That's it!

Longer version (optional): If for some reason, your

/usr/local/bin/python3 

is not pointing to the place you want, which is in our case:

/usr/local/Cellar/python/3.6.4_4/bin/python3

just back it up (+cool trick to add .orig suffix to file):

cp /usr/local/bin/python3{,.orig} 

and run:

rm -rf /usr/local/bin/python3

now create a new symbolic link:

ln -s /usr/local/Cellar/python/3.6.4_4/bin/python3 /usr/local/bin/python3 

and now your

/usr/local/bin/python3

is pointing to

/usr/local/Cellar/python/3.6.4_4/bin/python3 

Check it out by running:

ls -al /usr/local/bin/python3
Answer from Kohn1001 on Stack Overflow
🌐
Python documentation
docs.python.org › 3 › using › mac.html
5. Using Python on macOS — Python 3.14.3 documentation
Current installers provide a universal2 binary build of Python which runs natively on all Macs (Apple Silicon and Intel) that are supported by a wide range of macOS versions, currently typically from at least macOS 10.15 Catalina on. The downloaded file is a standard macOS installer package file (.pkg).
🌐
Reddit
reddit.com › r/learnpython › python's path on macos
r/learnpython on Reddit: Python's path on MacOS
February 25, 2024 -

I moved from Windows to a MacBook yesterday (runs MacOS 14 Sonoma on Apple Silicon). I'm trying to get Python to work properly on my MacBook but I'm having a hard time figuring it out.

I'm being able to run Python from the terminal but it doesn't run from VSCode. From the terminal (ZSH) too, only python3 ran but not python. To get around that, I followed an online article and added a ~/.zshrc file. I added these two lines to it:

alias python="/usr/bin/env python3"
alias pip="/usr/bin/env pip3"

I tried to install a Python package using pip but it hit me with a WARNING: The script normalizer is installed in '/Users/my_username/Library/Python/3.9/bin' which is not on PATH.

So till now I've understood that Python can be installed on Mac in 3 ways:

  1. The default inbuilt Python that comes with Mac out of the box.

  2. Python installed from the Python website via an installer.

  3. Python installed via Homebrew.

I am not being able to figure out the paths where each of these methods install Python. Which method is better for installing? Homebrew or download from the website? And once I have Python using one of the options, how do I make sure that it is the one used over the system Python? If I override the system Python, will there be any issues? How do I get Python to run from VSCode?

My MacOS and command line knowledge is very rudimentary so please correct me if I've said something wrong.

Top answer
1 of 2
1
Pyenv is going to do a lot to help you manage the various Python installs, and you can install it with Brew: https://formulae.brew.sh/formula/pyenv
2 of 2
1
it hit me with a WARNING Which method is better for installing? I‘m not sure why you have that warning, but maybe This Stackoverflow Question can help you. I do remember having some problems with zsh in this regard too, but I already forgot as this data back more than a year. If the link I just mentioned doesn’t help you, it may be good to revise install methods to see where the problem stems from. How did you install python? You mentioned three ways, but didn’t say which one you chose. I used the installer from pythons website and everything works fine, but I‘m also on intel (although that shouldn’t matter). Generally I don’t think there’s any superior method. And once I have python using one of the options, how do I make sure that it is the one used over the system python? I’m not sure what you mean here. What „system python“ are you talking about and what do you mean with „used over“? As far as I know OSX doesn’t come with python preinstalled and you’re pretty much just installing a framework to run it on. If you want to use a specific version you can use python3.11.7 [path/file.py] to execute a .py file in 3.11.7 for example. Same goes for any other version (at least in python3). If I override the system Python, will there be any issues? Again, as far as I’m concerned OSX doesn’t come with python preinstalled since a long time. And no, of you download multiple versions of python through the installer on the official website, nothing is being overwritten. I’m not sure about the other methods, but I don’t think they’d do either. As mentioned before, to execute different versions, just add the python version to the call python3.12.1 path/file.py (here to execute in 3.12.1). How do I get Python to run from VSCode? VSCode usually detects and chooses an interpreter for you (that you also have installed). Apart from that you can also manually change the interpreter in the settings, the command line or ¿the search bar? (I forgot how it’s called, but I mean the thing where you put in the „>“ to get some options).
🌐
AskPython
askpython.com › home › finding where python is installed (when it isn’t the default dir)
Finding Where Python Is Installed (when it isn't the default dir) - AskPython
April 10, 2025 - In summary, using which, type, and readlink allows locating both global and virtual environment Python installs on Linux and Unix. On macOS, Python generally gets installed into the /Library/ or ~/Library/ folders.
🌐
Reddit
reddit.com › r/macos › python's path on macos
r/MacOS on Reddit: Python's path on MacOS
February 25, 2024 -

I moved from Windows to a MacBook yesterday (runs MacOS 14 Sonoma on Apple Silicon). I'm trying to get Python to work properly on my MacBook but I'm having a hard time figuring it out.

I'm being able to run Python from the terminal but it doesn't run from VSCode. From the terminal (ZSH) too, only python3 ran but not python. To get around that, I followed an online article and added a ~/.zshrc file. I added these two lines to it:

alias python="/usr/bin/env python3"
alias pip="/usr/bin/env pip3"

I tried to install a Python package using pip but it hit me with a WARNING: The script normalizer is installed in '/Users/my_username/Library/Python/3.9/bin' which is not on PATH.

So till now I've understood that Python can be installed on Mac in 3 ways:

  1. The default inbuilt Python that comes with Mac out of the box.

  2. Python installed from the Python website via an installer.

  3. Python installed via Homebrew.

I am not being able to figure out the paths where each of these methods install Python. Which method is better for installing? Homebrew or download from the website? And once I have Python using one of the options, how do I make sure that it is the one used over the system Python? If I override the system Python, will there be any issues? How do I get Python to run from VSCode?

My MacOS and command line knowledge is very rudimentary so please correct me if I've said something wrong.

🌐
AskPython
askpython.com › home › how to find the python3 path on macos?
How to Find the Python3 Path on MacOS? - AskPython
April 10, 2025 - The default Python 3 installation on macOS Catalina and higher is typically located at /usr/local/bin/python3. To confirm your current Python 3 version from terminal, use python3 –version.
🌐
Apple Community
discussions.apple.com › thread › 8363465
Where do I find Python? - Apple Community
April 18, 2018 - macos 10.15.7 How to remove python 2.6 I am attempting to install PlatformIO on a iMac 2019 macos 10.15.7 but I get the following error: OSError: [Errno 86] Bad CPU type in executable: '/Library/Frameworks/Python.framework/Versions/2.6/bin/python' I get the same error if I enter python2.6 in to a terminal window. I am sure that python 2.6 is 32 bit and Catalina is 64 bit.
🌐
freeCodeCamp
freecodecamp.org › news › how-to-install-python-on-a-mac
How to Install Python on a Mac
May 9, 2024 - Notice that Rye installs its Python files to ~/.rye/shims/rye. Rye offers to set the $PATH to give precedence to its Python version by modifying the .profile file. Use of the .profile file is a Linux convention. On the Mac, it's preferred to set the $PATH in .zprofile or .zshrc files, preferably .zprofile.
Find elsewhere
🌐
The Hitchhiker's Guide to Python
docs.python-guide.org › starting › install3 › osx
Installing Python 3 on Mac OS X — The Hitchhiker's Guide to Python
The next step is to install Pipenv, so you can install dependencies and manage virtual environments. A Virtual Environment is a tool to keep the dependencies required by different projects in separate places, by creating virtual Python environments for them. It solves the “Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keeps your global site-packages directory clean and manageable.
🌐
Agnostic Development
agnosticdev.com › content › how-see-where-python-site-package-are-installed-macos
How to See Where Python Site Package are Installed on macOS | Agnostic Development
March 2, 2019 - From the terminal you will enter the command: "python -m site." This should print out a list of the directories Python uses when looking for site packages or frameworks when executing Python code. To further help, here is a short video tutorial that I created on how to run through this process on macOS:
🌐
Quora
quora.com › How-do-I-know-if-Python-is-installed-on-my-Mac
How to know if Python is installed on my Mac - Quora
... Whether or not Python is installed on your system can be determined using following methods. If you are using Linux OS, there is no need to install Python as you get Python pre-installed on these systems..
🌐
Dev2QA
dev2qa.com › home › how to find where python is installed on mac, linux, and windows
How To Find Where Python Is Installed On Mac, Linux, And Windows Windows Tricks
April 23, 2024 - Open the terminal on Linux or Mac ... of folders that contain the text python3. But in general, the python3 binary file is installed in the /usr/bin or /usr/local/bin folder....
🌐
Quora
quora.com › How-do-I-find-a-Python-path-on-a-Mac
How to find a Python path on a Mac - Quora
PYTHONPATH, but setting these variables for programs started from the Finder is non-standard as the Finder does not read your .profile or .cshrc at startup. You need to create a file ~/.MacOSX/environment.plist.
🌐
DataCamp
datacamp.com › blog › how-to-install-python
How to Install Python on Mac and Windows | DataCamp
December 4, 2024 - In this tutorial, we'll walk you through the process of installing Python on Windows and Mac using various methods, how to check which version of Python is on your machine, and how to get started with Python.
🌐
freeCodeCamp
freecodecamp.org › news › how-to-fix-python-installation-errors-on-mac
How to Fix Common Python Installation Errors on macOS
June 10, 2024 - Here are the most common locations for Python on a Mac: /usr/bin/python3 is the system Python installed with Xcode Command Line Tools.
🌐
Python
docs.python.org › 3.12 › using › mac.html
5. Using Python on a Mac — Python 3.12.12 documentation
A symlink to the Python executable is placed in /usr/local/bin/. ... On macOS 10.8-12.3, the Apple-provided build of Python is installed in /System/Library/Frameworks/Python.framework and /usr/bin/python, respectively.
🌐
Mac Install Guide
mac.install.guide › python › system-default
Check If Python Is Installed · Mac Install Guide · 2026
New releases of Python come yearly, typically released in October. The next version, Python 3.14, is expected in October 2025. Python is not pre-installed on macOS, though developers often find it on Macs.
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.

🌐
Oreate AI
oreateai.com › blog › how-to-check-the-default-python-installation-path-on-mac-terminal › ed494d7502e3b292c4095d0e310b7c40
How to Check the Default Python Installation Path on Mac Terminal - Oreate AI Blog
December 22, 2025 - The system's built-in Python path is typically located at '/System/Library/Frameworks/Python.framework/Versions', which may contain multiple versions of Python under 'Current'. Navigate to 'Current/bin' and run './python --version' to see the system's active version (note: using 'python --version' checks the user's currently set version). If you've installed Python via Homebrew, it will be found at '/usr/local/Cellar/python', specifically under its respective version folder (e.g., 2.7.x).
🌐
Quora
quora.com › Is-Python-automatically-installed-on-a-Mac
Is Python automatically installed on a Mac? - Quora
With macOS 12.0 (Monterey), they announced that Python 2 was gone—but it was actually still there; they just set things up so that if you installed your own Python from python.org/Homebrew/Anaconda, their version wouldn’t get in the way as much anymore.