Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nu11secur1ty/7f6bd2a1ac36cbc8be189ef43eee33d4 to your computer and use it in GitHub Desktop.

Select an option

Save nu11secur1ty/7f6bd2a1ac36cbc8be189ef43eee33d4 to your computer and use it in GitHub Desktop.

Revisions

  1. Anton Ivanov revised this gist Feb 26, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_python3.6_opensuse42.3.sh
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nf

    # Step 2. Install missing headers for all the Python modules to be built

    sudo zypper install readline-devel sqlite3-devel libbz2-devel
    sudo zypper install readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel

    # Step 3. Install the desired Python version

  2. Anton Ivanov created this gist Oct 23, 2017.
    27 changes: 27 additions & 0 deletions install_python3.6_opensuse42.3.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    # !/bin/bash

    # Step 1. Install pyenv

    git clone https://github.com/pyenv/pyenv.git ~/.pyenv
    echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
    echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
    echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc

    # Step 2. Install missing headers for all the Python modules to be built

    sudo zypper install readline-devel sqlite3-devel libbz2-devel

    # Step 3. Install the desired Python version

    pyenv install 3.6.3

    # Step 4. Install virtualenv

    sudo zypper install python3-virtualenv

    # Step 5. Create a virtual environment for the installed Python and activate it

    mkdir ~/pythons
    cd ~/pythons
    virtualenv -p ~/.pyenv/versions/3.6.3/bin/python3.6 python3.6.3
    source ./python3.6.3/bin/activate