I want the very latest version of Python, but I don't want to bypass the apt package manager: I don't want to do an old-school source install because that can make it harder to uninstall when the official packages come out.

Python3.5 is not currently featured in any of Canonical's package repositories, which means I cannot just "apt-get install python3.5".

Is there a way to get Python3.5 installed on my PC in the meantime?

  • 1
    possible duplicate of Install Python 3.3.2 on Ubuntu – dobey Sep 15 '15 at 21:52
  • 4
    Not a duplicate: Python 3.3.x comes with Ubuntu, python 3.5 is brand new and not yet part of an official package. – Salim Fadhley Sep 15 '15 at 21:53
  • 1
    It is a duplicate. The answer is the same. That question was simply asked at a time when 3.3.2 was the new version. Use the PPA. Python 3.5 was being built in it when I voted this as a duplicate. – dobey Sep 16 '15 at 3:23
  • 2
    There is now - Oct. 6th - a PPA with Python3.5 available. See my answer – Nephente Oct 8 '15 at 6:56
up vote 14 down vote accepted

Before Ubuntu adds python 3.5 to the official repositories you have two options to install it now :

  • Check if someone has come with a PPA containing python 3.5 so that you can install/remove it using apt-get or other package manager

  • Install from source

As fas as i can see there is no such PPA available till date so your only option is to install from source file.


You have said :

I don't want to do an old-school source install because that can make it harder to uninstall when the official packages come out.

Perhaps you have not heard of checkinstall yet, it creates a package out of the files that are going to be saved on different places in your computer at the last step of compiling a package from source (sudo make install). So you just need to replace sudo make install with sudo checkinstall and then you can remove the package you named using any package manager in the usual manner.

Check man checkinstall to get more idea.


Update:

A PPA is now available. Check this answer.

  • It's not necessary for python, because it's already have a target in MakeFile called altinstall. it's working well for many years in all distros. – pylover May 20 '16 at 10:14

There is a another answer to a similar question here: How do I install newer Python versions using apt-get?

Basically, it says that (until official repositories have the new python version) here is a source to use with the package manager, for us who prefer to use this simpler method, as that's what package managers are there for:

sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.5

Kudos to Felix Krull, who runs this PPA!

  • 1
    I'm on Ubuntu 15.04. I was able to get Python 3.5.1 installed using this method. However, I had to manually do: sudo rm /usr/bin/python3, then sudo ln -s /usr/bin/python3.5 /usr/bin/python3 – AAAfarmclub Aug 27 '16 at 8:29

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.