conda install python=3.12 # Or create a new environment conda create -n py312 python=3.12 conda activate py312 After upgrading, ensure pip is updated for the new Python version:

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.

Upgrading Python on Linux can be approached in several ways, depending on your Linux distribution, whether you want to replace the system Python, and your need for multiple Python versions. This guide covers the safest and most common methods. Important Warning: Don't Replace the System Python Most modern Linux distributions (Ubuntu, Debian, Fedora, CentOS, etc.) rely on their default Python installation for critical system tools like apt , yum , and gnome-terminal .