I re-installed macOS Monterey and Python. I open the terminal and execute Python. This is the result:
~ $ python -V zsh: command not found: python
The python3 command works:
bin $ python3 -V Python 3.10.4
The solution is to create a symlink
bin $ ls -la . . lrwxrwxr-x 1 root admin 10 May 29 19:05 python3 -> python3.10 . .
In here you see a python3 symlink that points to python3.10.
ln -s python3.10 python
~ $ python -V Python 3.10.4
Voila. You can now use the python command to execute Python 3 scripts.
It works in a virtual environment too:
$ python -m venv env $ source env/bin/activate (env) $ python -V Python 3.10.4