Last active
September 30, 2018 04:14
-
-
Save c0mpiler/a8e92d8842ded56b651420c6e35633e4 to your computer and use it in GitHub Desktop.
Setup python 3.7 on Ubuntu
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
#! /usr/bin/env bash | |
# Requirements | |
sudo apt-get install -y build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev zlib1g-dev openssl libffi-dev python3-dev python3-setuptools wget | |
# Prepare to build | |
mkdir /tmp/Python37 | |
cd /tmp/Python37 | |
# Pull down Python 3.7, build, and install | |
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz | |
tar xvf Python-3.7.0.tar.xz | |
cd /tmp/Python37/Python-3.7.0 | |
./configure --enable-optimizations | |
make altinstall | |
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.7 1 | |
update-alternatives --install /usr/bin/pip3 pip3 /usr/local/bin/pip3.7 1 | |
# https://github.com/pypa/pip/issues/4924 | |
mv /usr/bin/lsb_release /usr/bin/lsb_release.bakup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment