Last active
February 21, 2019 06:33
-
-
Save e-roux/d9b4a1ec926bd6654aaa1e3670de86e1 to your computer and use it in GitHub Desktop.
Install Python under Raspbian
This file contains hidden or 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 | |
# This script is meant for quick & easy install via: | |
# $ curl -fsSL https://gist.githubusercontent.com/gwin-zegal/d9b4a1ec926bd6654aaa1e3670de86e1/raw/python_setup_raspbian.sh | sh | |
sudo apt-get -y update | |
sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev | |
PY_VERSION='3.7.2' | |
curl -o /tmp/python.tar.xz https://www.python.org/ftp/python/${PY_VERSION}/Python-${PY_VERSION}.tar.xz | |
tar xf /tmp/python.tar.xz \ | |
--directory=/tmp/python \ | |
--strip 1 | |
mkdir /tmp/python | |
cd /tmp/python | |
./configure | |
make -j 4 | |
sudo make altinstall | |
cd /usr/local/bin | |
sudo ln -s 2to3-3.7 2to3 | |
sudo ln -s easy_install-3.7 easy_install | |
sudo ln -s idle3.7 idle | |
sudo ln -s pydoc3.7 pydoc | |
sudo ln -s pyvenv-3.7 pyvenv | |
sudo ln -s pip3.7 pip | |
sudo pip install --upgrade pip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment