8/9/2023 0 Comments Sudo apt install python![]() Run the following commands: sudo update-alternatives -install /usr/bin/python3 python3 /usr/bin/python3.5 1 I'll describe both just for educational purposes. The first one is a little bit better, using update-alternatives. You'll need to update the symbolic links, using one of the two methods below. This doesn't update the symlink automatically. Second, install your chosen Python version, specifying explicitly the minor version: sudo apt install python3.10 python3.10-venv python3.10-dev Sudo add-apt-repository ppa:deadsnakes/ppa Step-by-step about how to do itįirst, update and upgrade everything, install software-properties-common package (to deal with PPA keys), import deadsnakes PPA repository and update the apt index again: sudo apt update & sudo apt upgrade -y Turns out that you'll also need to import an apt-specific repository through its PPA key. To install, let's say, Python 3.10, you'll need to install a new version, mentioning also the minor version. In other words, you'll have the most updated 3.5 version, but not the most updated 3 version. When you upgrade python3.5, you're upgrading the minor-minor version inside 3.5, but not moving out from 3.5. Well, it's not the case for Python in apt, apparently. But, why? In theory if you upgrade, the minor version should go up, right? ![]() ![]() This indicates that your python3 command still points to your python3.5 installation. The response will be: lrwxrwxrwx 1 root root 9 /usr/bin/python3 -> python3.5 In other words, if you try: which python3 Updating Python 3 using sudo apt-get upgrade python3 doesn't change the symlink automatically. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |