Skip to content

Instantly share code, notes, and snippets.

@yanik-ai
Forked from chaosmail/install_python3.sh
Last active September 11, 2015 12:38
Show Gist options
  • Save yanik-ai/e6c858175c4c2fe6a8a2 to your computer and use it in GitHub Desktop.
Save yanik-ai/e6c858175c4c2fe6a8a2 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