Upgrade Python Linux [2021] [95% LIMITED]
python3.12 -m pip install --upgrade pip To install packages for your new Python:
Remember: run sudo make install without altinstall , and never manually symlink /usr/bin/python3 to a custom build unless you know exactly what you're doing. upgrade python linux
export PATH="$HOME/.pyenv/bin:$PATH" eval "$(pyenv init -)" Restart your shell. # List available Python versions pyenv install --list Install a specific version pyenv install 3.12.2 Set global (user-wide) Python version pyenv global 3.12.2 Set local (project-specific) version pyenv local 3.12.2 Verify python --version python3
pyenv – it's safe, flexible, and doesn't require root. and doesn't require root.
