Last active
January 27, 2021 18:02
-
-
Save dwayne/87f807f0d313b444bb37 to your computer and use it in GitHub Desktop.
Play with Python 3.5.1 in Vagrant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = 'ubuntu/trusty64' | |
config.vm.provision 'shell', path: 'install-python' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This helped a lot in trying to install an up to date version of python, thanks!