Skip to content

Instantly share code, notes, and snippets.

@dwayne
Last active January 27, 2021 18:02
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwayne/87f807f0d313b444bb37 to your computer and use it in GitHub Desktop.
Save dwayne/87f807f0d313b444bb37 to your computer and use it in GitHub Desktop.
Play with Python 3.5.1 in Vagrant
#!/bin/bash
set -e
if [ -x /usr/local/bin/python3.5 ]; then
echo 'Skipping Python installation since Python 3.5 is already installed.'
else
echo 'Install required libraries...'
apt-get update -yq
apt-get install -yq libreadline-dev libsqlite3-dev libssl-dev
echo 'Install Python 3.5...'
cd /tmp
wget -O- https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz | tar xz
cd Python-3.5.1
./configure
make
make altinstall
echo 'Clean up...'
cd && rm -rf /tmp/Python-3.5.1
echo 'Done!'
fi
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = 'ubuntu/trusty64'
config.vm.provision 'shell', path: 'install-python'
end
@MFry
Copy link

MFry commented Mar 4, 2016

This helped a lot in trying to install an up to date version of python, thanks!

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