Is it possible to install Python 3.x in 14.04 LTS, or upgrade from Python 2.7.6 to 2.7.8?

Solution 1:

According to the package listing, Ubuntu 14.04 comes with Python 3.4 installed by default. Run python3 if you want python3.x.x (or python3.4 if you want python3.4.x).

Until most components have been migrated to Python 3, both 2.7.x and 3.x will be available on Ubuntu, with python being python2.

Python 2.7.8 isn't available in the official repositories. However, there's a PPA available: Old and New Python versions. See What are PPAs and how do I use them? to understand how to use PPAs. Also note that while the version in Ubuntu 14.04 may remain 3.4.0 for sometime, the devs will be backporting fixes from 3.4.1.

Solution 2:

pyenv seems the way to go if you want to play with more than just the distribution's supplied version of Python 2.x and the supplied version of Python 3.x.

It let's you install many different Python versions side-by-side and choose between them. The installation happens inside a hidden directory in your home directory so you do not have to be root, you cannot disturb other people using other accounts (if there are any on your machine) and the "main" installation is always safe and secure and will not be changed or overridden in any way.

https://github.com/yyuu/pyenv#installation