Skip to content

Instantly share code, notes, and snippets.

@evgenys91
Forked from vbe0201/get-python.sh
Last active February 23, 2021 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evgenys91/af10f4c860316afe06d55264719f3b21 to your computer and use it in GitHub Desktop.
Save evgenys91/af10f4c860316afe06d55264719f3b21 to your computer and use it in GitHub Desktop.
A script to install Python 3.7.2 on your Debian, Ubuntu or Mint server.
#!/bin/bash
#
# A bash script for installing Python 3.7.2 on your Debian, Ubuntu or Mint server.
# (c) 2019 Valentin B.
#
# Open your terminal and enter the following command:
# wget https://gist.github.com/evgenys91/af10f4c860316afe06d55264719f3b21/raw/get-python.sh && chmod +x get-python.sh && ./get-python.sh
apt update -y
apt upgrade
apt install build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev -y
mkdir python_installation && cd python_installation
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
tar xzvf Python-3.7.2.tgz
rm -f Python-3.7.2.tgz
cd Python-3.7.2
./configure
make
make altinstall
cd ../..
rm -rf python_installation
python3.7 -m pip install -U pip
echo '$alias pip3="python3.7 -m pip"' >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment