I'm currently using Mac Pro and downloaded python through brew install python
for the latest version (though it downloaded 3.9.12 instead of 3.10.x).
Also, while playing with the command lines, I also installed pyenv
(version 2.2.5).
The problem is, I am now unable to get the default python version.
The command python --version
and python -h
all gives me zsh: command not found: python
.
However, when I do python3 --version
, it gives me Python 3.9.12
.
Did I mess things up? Is there are way to go back to the state before I altered anything? (or at least recover my default python
version?)
What version of MacOS are you running? Starting in 12.3, Python2 was removed from the system.
https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes
Python Deprecations Python 2.7 was removed from macOS in this update. Developers should use Python 3 or an alternative language instead. (39795874)