Skip to content

Instantly share code, notes, and snippets.

@cstockton
Created July 25, 2018 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cstockton/4226a649e8448a45edcef6e194efd8cd to your computer and use it in GitHub Desktop.
Save cstockton/4226a649e8448a45edcef6e194efd8cd to your computer and use it in GitHub Desktop.
pyenv setup
# Lang - Python (pyenv)
#
# $ git clone -C /ws/lang https://github.com/pyenv/pyenv
# $ # uncomment deb-src sources for python /etc/apt/sources.list
# $ apt-get update && apt-get build-dep python{2.7,3,3.7}
# $ pyenv install 2.7.15
# $ pyenv install 3.7.0
# $ pyenv versions
# > * system (set by /ws/lang/pyenv/version)
# > 2.7.15
# > 3.7.0
# ) pyenv global 2.7.15
# $ pyenv versions
# > system
# > * 2.7.15 (set by /ws/lang/pyenv/version)
# > 3.7.0
# $ # add follow env vars to your dot files:
# $ export PYENV_ROOT="${ONE_WS}/lang/pyenv"
# $ export PATH="${PATH}:${PYENV_ROOT}/bin"
# $ # reload shell
# $ pip install --upgrade pip # upgrade pip
# $ # _IMPORTANT_ remove the global system installed virtualenv first if it
# $ # exists to prevent issues, check with:
# $ which virtualenv
# > # SHOULD BE $PYENV_ROOT/shims/virtualenv, e.g.:
# > /ws/lang/pyenv/shims/virtualenv
# > # If it looks like the below, remove it with `pip uninstall virtualenv`
# > /home/cstockton/.local/bin/virtualenv
# $ # Now reinstall virtualenv with pip install
# $ pip install virtualenv
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment