Skip to content

Instantly share code, notes, and snippets.

@rduplain
Last active November 18, 2015 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rduplain/c4684a78414894ec5b3c to your computer and use it in GitHub Desktop.
Save rduplain/c4684a78414894ec5b3c to your computer and use it in GitHub Desktop.
Simple, throwaway script to build Python 3.5 from source on Unix systems.
#!/bin/bash
set -e
apt-get build-dep -y python-imaging matplotlib lxml python3 # Ubuntu 12.04+, adjust to your needs
cd /usr/local/src/
curl -L -O https://python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz
tar -xf Python-3.5.0.tar.xz
cd Python-3.5.0
./configure --prefix=/usr/local/python3.5
make && make install
ln -s /usr/local/python3.5/bin/python3.5 /usr/bin/python3.5
ln -s /usr/local/python3.5/bin/pyvenv-3.5 /usr/bin/pyvenv-3.5
ln -s /usr/local/python3.5/bin/pip3.5 /usr/bin/pip3.5
which python3.5
python3.5 -m this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment