For my project I need Python 3.4 (beta 2) for its asyncio module, but there is no official package for Ubuntu yet (unlike Windows, which has an MSI already). I'd like to know how can I install Python 3.4 (beta 2) from the downloadable tarball without breaking my system. By not breaking my system I mean that I can use the update-alternatives and env scripts, have the python3.4 and pip3.4 binaries without conflicts, etc. as usual on Ubuntu. As far as I know the default make script does not 100% respect default system paths in Ubuntu (I previously had problems installing Python 2.7.4 before the official deb package came out for it).


Too late for you, probably, but in case this is useful for anyone else... here's how to take advantage of the fact that Python 3.4 is in the Trusty repositories. Not sure if there are problems with this method but it's working for me.

  1. Set your preferred release to Saucy (to prevent problems from what we're about to do next):

    sudo echo 'APT::Default-Release "saucy";' >> /etc/apt/apt.conf.d/01ubuntu
  2. Add Trusty to your sources.

    sudo echo 'deb http://archive.ubuntu.com/ubuntu trusty restricted main multiverse universe' >> /etc/apt/sources.list
  3. If all is working properly, you should be able to manually install packages from Trusty, but only for packages that don't exist for Saucy. To double-check nothing got screwed up, make sure apt doesn't want to upgrade 500 packages.

    sudo apt-get update
    sudo apt-get dist-upgrade

    If there are many many packages that want to upgrade, something went wrong. Press 'N' to cancel the upgrade. Roll back your changes and try again or post here in case I'm not explaining this right, maybe someone else can help figure out what's going on.

  4. If all is going to plan, you should now be able to install python 3.4.

    sudo apt-get install python3.4 python3.4-dev python3.4-dbg python3.4-doc

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.