Skip to content

Instantly share code, notes, and snippets.

@beyoung
Forked from chaosmail/install_python3.sh
Created October 21, 2015 14:09
Show Gist options
  • Save beyoung/1756a9bdf00fc1a4157c to your computer and use it in GitHub Desktop.
Save beyoung/1756a9bdf00fc1a4157c to your computer and use it in GitHub Desktop.
Install Python 3.4.3 on Ubuntu
## Common Packages
# ---------------
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install software-properties-common libssl-dev openssl wget
## Install latest Python 3
# -----------------------
PY_VERSION=3.4.3
PY_URL="https://www.python.org/ftp/python/$PY_VERSION/Python-$PY_VERSION.tgz"
PY_DIR="Python-$PY_VERSION"
# Run these cmd in /opt
cd $HOME
# Download Python
wget "$PY_URL"
# Extract it
sudo tar -xvf "$PY_DIR.tgz" -C /opt && rm -f "$PY_DIR.tgz"
# Link the headers
sudo ln -s "/opt/$PY_DIR/Include" /usr/include/python3.4
# Change to the directory
cd "/opt/$PY_DIR"
# Configure and make
./configure && make
# Install it
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment