developers' network - quick start guides to bootstrap examples

(Perfect for people with a short attention span, needing to get work done!)

Original blog article from (with all command text in BOLD LETTERING):

Install pyenv and LinuxBrew via GGCOM Ansible Playbooks:

  • ansible-playbook ~/ggcom/ggcom-ansible-playbooks/ubuntu/pyenv.yml –extra-vars 'target=nameFromHostsFile user=nameOfUserUsingPyenv'
  • ansible-playbook ~/ggcom/ggcom-ansible-playbooks/linuxbrew.yml –extra-vars 'target=nameFromHostsFile user=nameOfUserUsingPyenv'

Create temporary directory using 1 of 2 methods:

  1. System Temporary Directory
    1. export TMPDIR=`mktemp -d 2>/dev/null || mktemp -d -t 'ggcom'`
  2. User Temporary Directory
    1. mkdir -pv "$HOME/tmp"
    2. export TMPDIR="$HOME/tmp"

Create temporary directory for Linuxbrew:

  • mkdir -pv "$HOME/.linuxbrew/tmp"

Set Linuxbrew temporary directory:

  • export HOMEBREW_TEMP=$HOME/.linuxbrew/tmp

When you resolve any other outstanding issues, proceed as follows:

  • brew install git (not needed if your system git is up-to-date)
  • brew install pkg-config
  • brew install openssl
  • OPENSSL_ROOT="$(brew –prefix openssl)"
  • pyenv install 2.7.9 (or 3.4.3)
  • pyenv virtualenv 2.7.9 mySuperDevVirtualEnv

Check pyenv versions available (you should see mySuperDevVirtualEnv available):

  • pyenv versions

Begin using new virtualenv using 1 of 2 methods:

  1. pyenv global mySuperDevVirtualEnv
  2. pyenv local mySuperDevVirtualEnv

Confirm Python version from virtualenv:

  • which python
    • should return the equivalent of "$HOME/.pyenv/versions/mySuperDevVirtualEnv/bin/python"

Test Python:

  • [user@host $] python -c "import ssl; print ssl.OPENSSL_VERSION"
    • At the time of this writing, should return at least "OpenSSL 1.0.2 22 Jan 2015"
  • [user@host $] python -c "import ssl; print ssl.PROTOCOL_TLSv1_2"
    • At the time of this writing, should return "5"

Make modifications to ~/.bash_profile:

  • OPENSSL_ROOT="$(brew –prefix openssl)"