
Remember the selected number may differ so choose the selection number which is for Python 3.10.įinally, test the current version of python by typing this :

Now type 2 and hit enter for Python 3.10. That means when we run python3 it will execute as python3.8 but we want to execute this as python3.10. Sudo update-alternatives -install /usr/bin/python3 python3 /usr/bin/python3.10 2 Step 4: Update Python 3 for point to Python 3.10īy default, Python 3 is pointed to Python 3.8. Sudo update-alternatives -install /usr/bin/python3 python3 /usr/bin/python3.8 1 Sudo apt-get install python3.10 Step 3: Add Python 3.8 & Python 3.10 to update-alternativesĪdd both old and new versions of Python to Update Alternatives. Install Python 3.10 by using the below command : Step 2: Install the Python 3.10 package using apt-get Verify the updated Python packages list using this command.Īs seen in the image above, Now we have Python 3.10 available for installation. Update the package list using the below command. Sudo add-apt-repository ppa:deadsnakes/ppa On launchpad repository named deadsnakes is available for Python Packages.Īdd the deadsnakes repository using the below commands. So, we have to add an additional repository. Latest Python 3.10 is not available in Ubuntu’s default repositories.


Step 4: Update Python 3 for point to Python 3.10įollow the simple steps to install and configure Python 3.10 Step 1: Add the repository and update.Step 3: Add Python 3.8 & Python 3.10 to update-alternatives.Step 2: Install the Python 3.10 package using apt-get.Running cache policy for python: python2. I updated the repository before trying to install python. I can access Python3.5 by just typing python3, but I need python2.7. Try 'apt-get -f install' with no packages (or specify a solution). Done You might want to run 'apt-get -f install' toĬorrect these: The following packages have unmet dependencies:ĭepends: python but it is not going to be installed Done Building dependency tree Reading state When I trype python or python2 or python2.7, I get the following message: The program 'python' can be found in the following packages:Īfter running sudo apt install python2.7, I get the following message but python is still unavailable when I type python.

I'm trying to install Python 2.7 on Ubuntu 16.04.
