Skip to content

Instantly share code, notes, and snippets.

@chaosmail
Last active March 24, 2024 20:02
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save chaosmail/5b5dbab0cc80bf945671 to your computer and use it in GitHub Desktop.
Save chaosmail/5b5dbab0cc80bf945671 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
@midkin
Copy link

midkin commented Sep 1, 2015

zomg! what the hell did I just do? :D

@gabrielmathias
Copy link

It´s 2017 and this is still helpful.

@ajaychaudhary004
Copy link

awesome man!, thanks it worked

@1nikolas
Copy link

Works okay but you have to install build-essential in order to build

@john9631
Copy link

Thanks. Just installed it because I have a bug at Codewars that isn't there under Python 3.7 or 3.6.5 ... so now I have 4 versions 👍

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