Skip to content

Instantly share code, notes, and snippets.

@adamrpah
Created August 14, 2014 16:17
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 adamrpah/ed8f5db50ea249e9774d to your computer and use it in GitHub Desktop.
Save adamrpah/ed8f5db50ea249e9774d to your computer and use it in GitHub Desktop.
Amaral Lab Install pyenv
#!/usr/bin/env bash
set -e
# https://github.com/yyuu/pyenv-installer
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
echo -e "\nChecking if we need to modify your .bashrc\n"
while read line
do
if ! grep -qe "$line" ~/.bashrc; then
echo "Appending \"$line\" to your .bashrc"
echo "$line" >> ~/.bashrc
fi
done <<EOF
export PYENV_ROOT="\$HOME/.pyenv"
export PATH="\$PYENV_ROOT/bin:\$PATH"
eval "\$(pyenv init -)"
eval "\$(pyenv virtualenv-init -)"
EOF
exec $SHELL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment