Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lee-pai-long/b94f49aa3d1aeba86116518c8710ad5f to your computer and use it in GitHub Desktop.
Save lee-pai-long/b94f49aa3d1aeba86116518c8710ad5f to your computer and use it in GitHub Desktop.

[DEBIAN] Install python 3.4 on Wheezy using Apt Pinning

Create a file in the apt souces directory:

$ [sudo] vim /etc/apt/sources.list.d/jessie.list

Add this line:*

deb http://httpredir.debian.org/debian jessie main

Create a file in the apt preferences directory:

$ [sudo] vim /etc/apt/preferences.d/python3.pref

Add those line:

Package: python3 python3-dev python3-pip
Pin: release n=jessie
Pin-Priority: 910

Install python3!

$ [sudo] apt-get update \
> && [sudo] apt-get install python3 python3-dev python3-pip

See detail on each field on apt_preference manpage

The following extra packages will be installed:

  • dh-python
  • libc-bin
  • libc-dev-bin
  • libc6
  • libc6-dev
  • libdb5.3
  • libffi6
  • libgssapi-krb5-2
  • libk5crypto3
  • libkeyutils1
  • libkrb5-3
  • libkrb5support0
  • libmpdec2
  • libpython3-dev
  • libpython3-stdlib
  • libpython3.4
  • libpython3.4-dev
  • libpython3.4-minimal
  • libpython3.4-stdlib
  • libtirpc1
  • locales
  • nfs-common
  • python3-chardet
  • python3-colorama
  • python3-distlib
  • python3-html5lib
  • python3-minimal
  • python3-requests
  • python3-six
  • python3-urllib3
  • python3-wheel
  • python3.4
  • python3.4-dev
  • python3.4-minimal
  • task-english
  • tasksel

Suggested packages:

  • glibc-doc
  • krb5-doc
  • krb5-user
  • open-iscsi
  • watchdog
  • python3-doc
  • python3-tk
  • python3-venv
  • python3-genshi
  • python3-lxml
  • python3-ndg-httpsclient
  • python3-openssl
  • python3-pyasn1
  • python3.4-venv
  • python3.4-doc
  • binfmt-support

The following NEW packages will be installed:

  • dh-python
  • libdb5.3
  • libffi6
  • libmpdec2
  • libpython3-dev
  • libpython3-stdlib
  • libpython3.4
  • libpython3.4-dev
  • libpython3.4-minimal
  • libpython3.4-stdlib
  • python3-chardet
  • python3-colorama
  • python3-distlib
  • python3-html5lib
  • python3-requests
  • python3-six
  • python3-urllib3
  • python3-wheel
  • python3.4
  • python3.4-dev
  • python3.4-minimal

The following packages will be upgraded:

  • libc-bin
  • libc-dev-bin
  • libc6
  • libc6-dev
  • libgssapi-krb5-2
  • libk5crypto3
  • libkeyutils1
  • libkrb5-3
  • libkrb5support0
  • libtirpc1
  • locales
  • nfs-common
  • python3
  • python3-dev
  • python3-minimal
  • python3-pip
  • task-english
  • tasksel

Sources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment