Last active
September 11, 2022 02:19
-
-
Save jcarley/3d46571591dc9b1cabfe2859d926dbc8 to your computer and use it in GitHub Desktop.
Install python on Raspberry Pi 4
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
#!/usr/bin/env bash | |
# Execute with the following command | |
# /bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/jcarley/3d46571591dc9b1cabfe2859d926dbc8/raw/3f19acd19f03e48e7b688537709c442b75dde354/install_python.sh)" | |
sudo apt-get update | |
sudo apt-get install -y 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 tar wget vim | |
mkdir -p ~/downloads/python | |
wget https://www.python.org/ftp/python/3.10.7/Python-3.10.7.tgz -P ~/downloads/python | |
cd ~/downloads/python | |
sudo tar zxf Python-3.10.7.tgz | |
cd Python-3.10.7 | |
sudo ./configure --enable-optimizations | |
sudo make -j 4 | |
sudo make altinstall |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment