Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Command not working in mac terminal [duplicate]

I keep getting the error "zsh: command not found: python" while attempting to determine what version of Python my device is running.

python -v which returned - zsh: command not found: python python --version returned again, zsh: command not found: python

Please advise

like image 381
Marian Jones Avatar asked Jul 25 '26 12:07

Marian Jones


1 Answers

Depending on how you installed Python it will probably be called python3, not plain python. So python3 --version should work. You can then set up an alias for python to point to the correct package. This article explains a bunch of different approaches. Checking for the python version would prompt same error on Linux and Mac normally because of how you installed it

like image 164
bon_homie Avatar answered Jul 27 '26 00:07

bon_homie