Skip to content

Instantly share code, notes, and snippets.

@evgenys91

evgenys91/get-python.sh

Forked from vbe0201/get-python.sh
Last active Feb 23, 2021
Embed
What would you like to do?
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