Skip to content

Instantly share code, notes, and snippets.

@terrettaz
Last active January 27, 2019 13:47
Show Gist options
  • Save terrettaz/6e7343b83f1d980f08ea8d3fa8fc902d to your computer and use it in GitHub Desktop.
Save terrettaz/6e7343b83f1d980f08ea8d3fa8fc902d to your computer and use it in GitHub Desktop.
Rasberry Pi Python installation
#!/bin/bash
VERSION=3.7.0
sudo apt-get update -y
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y
wget https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz
tar xf Python-$VERSION.tar.xz
cd Python-$VERSION
./configure
make -j 2
sudo make altinstall
cd ..
sudo rm -r Python-$VERSION
rm Python-$VERSION.tar.xz
sudo apt-get --purge remove build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y
sudo apt-get autoremove -y
sudo apt-get clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment