From charlesreid1

Revision as of 01:59, 22 February 2018 by Admin (talk | contribs) (Created page with "=Start= This tutorial is assuming you start out on a machine with a conda-based python distribution (Anaconda or Miniconda or other). If you don't have a version of conda, i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Start

This tutorial is assuming you start out on a machine with a conda-based python distribution (Anaconda or Miniconda or other).

If you don't have a version of conda, it is recommended you use Pyenv to manage versions of python.

A very simple pyenv installation script:

install_pyenv.py

#!/usr/bin/python3
import getpass
import subprocess


def install_pyenv():
    user = getpass.getuser()
    if(user=="root"):
        raise Exception("You are root - you should run this script as a normal user.")
    else:
        # Install pyenv 
        pyenvcmd = ["curl","-L","https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer","|","/bin/bash"]
        subprocess.call(pyenvcmd, shell=True)

        # We don't need to add ~/.pyenv/bin to $PATH,
        # it is already done.


if __name__=="__main__":
    install_pyenv()