There are a few things that you could try:
- Make sure your path is correct and properly connected
- Go to
users>your_userthen click onCmd+shift+.this way you will be able to access the hidden files, then proceed to open the.bash_profileand make sure the export path is properly entered/or enter it and save. (remember to refresh the terminal before running the python command) - Try typing just python3 in the terminal, the terminal should automatically recognize which version of python you are working on.
- You could add your export path to
.zshrcfile and shift to the zsh terminal by enteringchsh -s /bin/zsh
There are a few things that you could try:
- Make sure your path is correct and properly connected
- Go to
users>your_userthen click onCmd+shift+.this way you will be able to access the hidden files, then proceed to open the.bash_profileand make sure the export path is properly entered/or enter it and save. (remember to refresh the terminal before running the python command) - Try typing just python3 in the terminal, the terminal should automatically recognize which version of python you are working on.
- You could add your export path to
.zshrcfile and shift to the zsh terminal by enteringchsh -s /bin/zsh
So by default, you can run python3 command but not run python command until you set the PATH and env vars in Mac.
Check if python is installed: which python3
If yes, then you need to check the info with this command
brew info python
In the output you will find the path where python is installed, something like this:
/opt/homebrew/opt/python@3.12/libexec/bin
So you need to run this commands by providing the above path:
echo 'export PATH=/opt/homebrew/opt/python@3.12/libexec/bin:$PATH' >> ~/.zprofile
After that in the new terminal, or if you want to use the same terminal run this command
source ~/.zprofile
Now you can see the path with this command:
echo $PATH;
After that, you can run the python command. 🙏
The correct Python version is not showing up in Terminal.
I just installed python on my Mac but my terminal is telling
macos - The terminal on my Mac does not work anymore after installing Python & Sublime Text - Ask Different
Not sure why I keep getting this error "zsh: Command not found: python" in the Mac terminal
I recently checked which version of Python I have on my Mac and it said 3.9... I then went and downloaded the newest version of Python (3.12). I then rechecked the version in my Mac terminal, which still showed up as 3.9... What am I doing wrong?
P.S: When I type python3 --version it pulls up 3.9.13
But when I type just Python I get:
Python 3.9.13 (main, Aug 25 2022, 18:29:29)
[Clang 12.0.0 ] :: Anaconda, Inc. on darwin
I am just starting to learn python. I downloaded python and everything but every time I try to use the python command I get the same error message.
If anyone has any advice or knows why this is happening, it would be much appreciated! Thanks.
When I used the brew list, it showed python@3.13 as installed. However whenever I type in python --version, it showed: zsh: command not found: python
Is it a matter of incorrect path in my .zshrc file? If so, what should it be? Thank you.
So I decided to dip my toes into Python as it's what's used by the developers at my work. Really just trying to get an understanding of the program and gain some familiarity. Trying to install on my new MacBook Pro M3 Max now. Installed latest version 3.12.1 but cannot get past this screen to open up the Python Terminal. Idle seems to work but when I open up the Python launcher, I do not get a screen that shows File..Edit..Format..Run..Etc. just the one attached. This also shows the dialog that pops up for settings. Anyway, not sure what I'm missing but Im sure it's something simple. Thanks in advance for your help. (doesn't look like I can post the screenshot so will add it to the next post or reply if I can.
https://bashify.io/images/LevBzp
