Skip to content

Instantly share code, notes, and snippets.

@thinmy
Created October 9, 2018 10:50
Show Gist options
  • Select an option

  • Save thinmy/cd4da49a31cdc1ee8d990511d835fcda to your computer and use it in GitHub Desktop.

Select an option

Save thinmy/cd4da49a31cdc1ee8d990511d835fcda to your computer and use it in GitHub Desktop.

Revisions

  1. @ndaidong ndaidong revised this gist May 8, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-python.sh
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ export PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/$PYTHON_VERSION/Pyt
    sudo apt update
    sudo apt install --no-install-recommends -y \
    software-properties-common build-essential \
    libssl-dev libreadline-dev libbz2-dev libsqlite3-dev \
    libssl-dev libreadline-dev libbz2-dev libsqlite3-dev zlib1g-dev \
    python-minimal

    cd ~/Downloads
  2. @ndaidong ndaidong revised this gist Apr 18, 2018. No changes.
  3. @ndaidong ndaidong revised this gist Apr 18, 2018. 1 changed file with 5 additions and 6 deletions.
    11 changes: 5 additions & 6 deletions install-python.sh
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,12 @@
    #!/bin/bash
    export PYTHON_VERSION=3.6.4
    export PYTHON_VERSION=3.6.5
    export PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz

    sudo apt update
    sudo apt install --no-install-recommends -y \
    gcc libssl-dev \
    python python-dev
    software-properties-common build-essential \
    libssl-dev libreadline-dev libbz2-dev libsqlite3-dev \
    python-minimal

    cd ~/Downloads

    @@ -18,13 +19,11 @@ sudo make install

    cd ..
    sudo rm -rf Python-$PYTHON_VERSION
    rm python.tar.tgz

    alias python=python3
    alias pip=pip3

    pip install --upgrade pip

    python --version
    pip --version

    pip --version
  4. @ndaidong ndaidong revised this gist Mar 12, 2018. No changes.
  5. @ndaidong ndaidong created this gist Mar 4, 2018.
    30 changes: 30 additions & 0 deletions install-python.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    #!/bin/bash
    export PYTHON_VERSION=3.6.4
    export PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz

    sudo apt update
    sudo apt install --no-install-recommends -y \
    gcc libssl-dev \
    python python-dev

    cd ~/Downloads

    wget "$PYTHON_DOWNLOAD_URL" -O python.tar.tgz
    tar -zxvf python.tar.tgz
    cd Python-$PYTHON_VERSION
    ./configure --enable-optimizations --enable-loadable-sqlite-extensions
    make
    sudo make install

    cd ..
    sudo rm -rf Python-$PYTHON_VERSION
    rm python.tar.tgz

    alias python=python3
    alias pip=pip3

    pip install --upgrade pip

    python --version
    pip --version