Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Python 3.7 on Raspbian Stretch
sudo apt-get install screen
screen
PACKAGES=(
"build-essential"
"libbz2-dev"
"libdb5.3-dev"
"libexpat1-dev"
"libffi-dev"
"libgdbm-dev"
"liblzma-dev"
"libncurses5-dev"
"libreadline-dev"
"libsqlite3-dev"
"libssl-dev"
"tk-dev"
"uuid-dev"
"zlib1g-dev"
)
unset INSTALL_SET
for P in "${PACKAGES[@]}"; do
INSTALL_SET="$INSTALL_SET $P"
done
sudo apt-get update
sudo apt-get install $INSTALL_SET
mkdir -p /apps
chown pi /apps /usr/local/src
cd /usr/local/src
VERSION=3.7.4
MAJOR=${VERSION:0:3}
curl -O https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz
tar xvf Python-$VERSION.tar.xz
cd Python-$VERSION
./configure --prefix=/apps/python-$VERSION --enable-optimizations
make
make install
ln -nsf /apps/python-$VERSION /apps/python-$MAJOR
/apps/python-$MAJOR/bin/python3 -V
PATH=/apps/python-$MAJOR/bin:$PATH
python3 -V
@copperlight

This comment has been minimized.

Copy link
Owner Author

commented Aug 17, 2019

  • ctrl-a, ctrl-d to detach from the screen session.
  • screen -list to list the existing sessions.
  • screen -r to re-attach to an existing session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.