Typing Python on my Terminal shows
Python 3.9.5 (default, May 4 2021, 03:36:27) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. When in fact I have installed the latest version, 3.10.6, which shows when I type python3 --version. Typing just python --version returns 3.9.5 again. It seems that the default version is 3.9.5 and not updated, or am I wrong? Either way, how do I solve this? I've tried both downloading and installing it directly, as well as through brew install ..., both giving successful installs, but not updating the default version (3.9.5 -> 3.10.6)
which pythonandwhich python3to see where their executables are respectively, that might help you troubleshoot.whichis hardly ever the right tool (unless one is using tcsh). The person asking, judging by their use of Homebrew and Terminal, seems to be on a Mac, which, on modern versions of macOS, means the default shell is zsh, wherewhence -vis more appropriate.which pythongave me/usr/local/opt/[email protected]/libexec/bin/pythonwhilewhich python3gave/opt/homebrew/bin/python3... I'm not good at using the terminal at all, I just code and that's it, so I'm kind of clueless as to how to solve thiswhence -v pythonand got in return the same as when usingwhich pythonbut with "python is" added in the beginning. Also typedwhence -v pythonand it again returned another path