A predictable unversioned python command matters when terminal commands, editor tasks, or lightweight automation run Python without a version suffix. Choosing that command explicitly avoids switching between runtimes on hosts that keep several Python 3 minor versions installed side by side.
On Linux and macOS, the shell resolves python by searching the directories in PATH from left to right. Current PEP 394 guidance leaves the unversioned python command flexible on Unix-like systems, so one host may map it to Python 3, another may omit it entirely, and an activated virtual environment may temporarily replace it with a project-local interpreter.
A user-owned symbolic link in ~/.local/bin keeps the change inside one account and puts that directory ahead of the rest of the interactive shell path. This does not replace a packaged /usr/bin/python binary, and scripts that call an explicit interpreter path, packaged entry point, or activated virtual environment continue to select their own runtime.
Related: How to check Python version
Related: How to create a virtual environment in Python
$ command -v python3.14 /usr/bin/python3.14
Replace python3.14 with the installed interpreter that should become the default, such as python3.13 or python3.12. Other systems may resolve the binary under /usr/bin, /usr/local/bin, or an Apple Silicon Homebrew prefix such as /opt/homebrew/bin.
$ mkdir -p ~/.local/bin
$ ln -sf "$(command -v python3.14)" ~/.local/bin/python
This changes only the unversioned python command for the current user. PEP 394 recommends implementing a configurable python command as a link to the interpreter rather than replacing the interpreter binary itself. To undo the change later, remove ~/.local/bin/python or point it at a different interpreter.
$ vi ~/.zshrc
export PATH="$HOME/.local/bin:$PATH"
Use ~/.bashrc for non-login Bash shells, ~/.bash_profile or ~/.profile for login Bash shells, and ~/.zshrc for Zsh.
$ source ~/.zshrc $ hash -r
Replace /.zshrc with the file edited in the previous step, such as /.bashrc or /.bash_profile.
$ command -v python /home/analyst/.local/bin/python $ python --version Python 3.14.4 $ readlink ~/.local/bin/python /usr/bin/python3.14
readlink confirms the target stored in the user shim. An activated virtual environment prepends its own bin directory and temporarily overrides this selection until the environment is deactivated.