Skip to content

Instantly share code, notes, and snippets.

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

[Debian] Install Python 3.4 on Debian 7 (Wheezy)

Install dependencies

$ [sudo] apt-get install \
> build-essential \
> libncurses5-dev \
> libncursesw5-dev \
> libreadline6-dev \
> libdb5.1-dev \
> libgdbm-dev \
> libsqlite3-dev \
> libssl-dev \
> libbz2-dev \
> libexpat1-dev \
> liblzma-dev \
> zlib1g-dev

Download python 3 from python.org website and uncompress it

$ wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz \
> -O /tmp/ && \
> tar -zxf $_ && \
> cd /tmp/Python-3.4.3 && \
> [sudo] ./configure --prefix=/opt/python-3.4.3 && \
> [sudo] make && \
> [sudo] make install

Add new python3 installation location to PATH

$ export PATH="/opt/python-3.4.3/bin/:$PATH"
$ echo '!!' >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment