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
🌐
AskPython
askpython.com › python › examples › find-python3-path-macos
How to Find the Python3 Path on MacOS? - AskPython
July 6, 2026 - Homebrew’s python formula installs to /opt/homebrew (Apple Silicon) or /usr/local (Intel) and symlinks python3 into /opt/homebrew/bin/python3 or /usr/local/bin/python3. You can have all three on the same machine.
Discussions

Python's path on MacOS
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). More on reddit.com
🌐 r/learnpython
9
4
February 25, 2024
Where do I find Python? - Apple Community
I know that mac-OS comes with an old version of Python. I can't remember how to access it on the Terminal. I'm pretty sure that I installed a newer version of Python on my mini. It doesn't show up in Applications. When I type the command in Terminal to start the new version of Python, the Terminal can't find the file. What is the path... More on discussions.apple.com
🌐 discussions.apple.com
April 18, 2018
Python's path on MacOS
Just add the directory where you installed python to your PATH. More on reddit.com
🌐 r/MacOS
10
1
February 25, 2024
macos - PATH on Mac not working for Python - Unix & Linux Stack Exchange
Find your community ... Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... I am trying to run a Python program from my command line on my Mac. (in this case: python3 Hello.py). For the life of me, I can’t get it to consider the PATH where the ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
December 31, 2024
People also ask

How do I find the Python 3 path on macOS?
Run python3 -c 'import sys\nprint(sys.executable)' in Terminal. The output is the absolute path of the binary that started the interpreter. For Apple Silicon Homebrew installs this is usually /opt/homebrew/bin/python3, for Intel it is /usr/local/bin/python3, and for the CommandLineTools Python it is /usr/bin/python3.
🌐
askpython.com
askpython.com › python › examples › find-python3-path-macos
How to Find the Python3 Path on MacOS? - AskPython
Why is my python3 path different from the one in the Applications folder?
The Applications folder Python is the python.org framework at /Library/Frameworks/Python.framework/Versions. Its symlink lives at /usr/local/bin/python3. Applications and the symlink are the same Python, but which one runs depends on PATH order. The Applications entry does not add /usr/local/bin to PATH by default.
🌐
askpython.com
askpython.com › python › examples › find-python3-path-macos
How to Find the Python3 Path on MacOS? - AskPython
Should I install pip packages into the system Python on macOS?
No. The system Python is read-only without sudo, and sudo pip install on macOS is the most common way to break the CommandLineTools Python. Use python3 -m venv to create an isolated environment, then pip install into the venv.
🌐
askpython.com
askpython.com › python › examples › find-python3-path-macos
How to Find the Python3 Path on MacOS? - AskPython
🌐
Mac Install Guide
mac.install.guide › python › path
Mac Python PATH · Mac Install Guide
June 5, 2024 - On a Mac with Apple Silicon, Homebrew installs files into the /opt/homebrew/ folder, which is not part of the default shell $PATH. Since June 2025, Homebrew's install script adds the folder to the end of the $PATH, after /usr/bin.
🌐
Python documentation
docs.python.org › 3 › using › mac.html
5. Using Python on macOS — Python 3.15.2 documentation
In here you find IDLE, the development ... macOS Finder. A framework /Library/Frameworks/Python.framework, which includes the Python executable and libraries. The installer adds this location to your shell path. To uninstall Python, you can remove these three things. Symlinks to the Python executable are placed in /usr/local/bin/. ... Recent versions of macOS include a python3 command in ...
🌐
Flavio Copes
flaviocopes.com › home › python › installing python 3 on macos
Installing Python 3 on macOS - Flavio Copes
2 weeks ago - Apple removed the old system Python 2 in macOS 12.3, back in 2022, and there is no python command out of the box. There is a /usr/bin/python3, but it’s a stub. The first time you run it, macOS asks you to install the Xcode Command Line Tools, and only then you get a real interpreter.
🌐
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
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).
2 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
Find elsewhere
🌐
Opensource.com
opensource.com › article › 19 › 5 › python-3-default-mac
The right and wrong way to set Python 3 as default on a Mac | Opensource.com
# If you added the previous alias, ... to where Homebrew installed Python in our environment, we can run brew info python and look for the path information....
🌐
Apple Community
discussions.apple.com › thread › 8363465
Where do I find Python? - Apple Community
April 18, 2018 - I am sure that python 2.6 is 32 bit and Catalina is 64 bit. From a terminal echo $PATH gives the following : /Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frame
🌐
freeCodeCamp
freecodecamp.org › news › how-to-fix-python-installation-errors-on-mac
How to Fix Common Python Installation Errors on macOS
June 10, 2024 - You'll need to find where Python is installed on your system, which takes some sleuthing because there are multiple ways to install Python on macOS. Here are the most common locations for Python on a Mac: /usr/bin/python3 is the system ...
🌐
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.

🌐
Educative
educative.io › answers › how-to-add-python-to-the-path-variable-in-mac
How to add Python to the PATH variable in Mac
The complete path of the Python (or Python3) UNIX executable can be added (for OS X 10.8 Mountain Lion and up) by:
🌐
Frost's Blog
frost-lee.github.io › macos-python
Python Interpreter on macOS | Frost's Blog
January 29, 2021 - Python you found under /usr/bin is usually system built-in interpreters, files under this path cannot be modified by users without modifying SIP, and it is strongly suggested not to do so. As far as I know, there may be 3 interpreters that are provided by the system. /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7: the Python 2.7 interpreter. Almost all Macs have this interpreter, its alias is located in /usr/bin/python · /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7: the Python 3.7 interpreter.
🌐
Quora
quora.com › How-do-I-find-a-Python-path-on-a-Mac
How to find a Python path on a Mac - Quora
Answer (1 of 4): Are you asking how do I find the path to the Python application or how to find the contents of the PYTHONPATH environment variable, or what? Python on a Mac is much like Python on Linux or Unix, because Mac OS 10 is built on top of Unix. So you use the standard Python commands t...
🌐
AskPython
askpython.com › python › examples › find-where-python-is-installed
Where Is Python Installed? Find Its Path - AskPython
1 month ago - In a macOS or Linux shell, use python3 to ask the running process for its executable path.
🌐
XDA Developers
xda-developers.com › home › macos › how to add python to path in macos
How to add Python to PATH in macOS
November 2, 2024 - You can check the install location of Python by following these steps: Head to Launchpad on Mac (by pressing Command and the Spacebar) and type Terminal. Type which python (for Python 2.x) or which python3 and hit Return.
🌐
Real Python
realpython.com › lessons › adding-python-path-macos
Adding Python to PATH on macOS (Video) – Real Python
So which python3 points to this file at /Library/Frameworks/Python.framework inside of that folder. 02:32 That’s the default location where the python.org installer will put your Python executable. If you installed Python via Homebrew or Anaconda, it’s going to have either Homebrew or Anaconda in the path.
Published: March 31, 2026
🌐
YouTube
youtube.com › sourcegpt
how to find python location on mac - YouTube
Download this code from https://codegive.com Sure, finding the location of Python on a Mac can be done through the terminal. Python usually installs in a few...
Published: December 25, 2023
Views: 252
🌐
YouTube
youtube.com › watch
how to find python path mac
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.