Skip to content

Instantly share code, notes, and snippets.

@ammgws
Last active April 24, 2019 11:58
Show Gist options
  • Save ammgws/290fa3cb1cf6d45cf8e8b0fab3a40fed to your computer and use it in GitHub Desktop.
Save ammgws/290fa3cb1cf6d45cf8e8b0fab3a40fed to your computer and use it in GitHub Desktop.
Install Python 3.6 on Ubuntu 16.04

Using pyenv seems to be the easiest way apart from a random PPA or finding/downloading/compilign the source myself.

Build dependencies:

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev

Install Pyenv (as the user who will use it, not root):

curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash

~/.config/fish/config.fish

set -x PATH "/home/user/.pyenv/bin" $PATH
status --is-interactive; and . (pyenv init -|psub)
status --is-interactive; and . (pyenv virtualenv-init -|psub)
pyenv update
pyenv install 3.6.4
pyenv virtualenv 3.6.4 general

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