Skip to content

Instantly share code, notes, and snippets.

@slurpyb
Created August 28, 2019 15:22
Show Gist options
  • Save slurpyb/a72aed845297cebd5e4bbc76eb20b5ae to your computer and use it in GitHub Desktop.
Save slurpyb/a72aed845297cebd5e4bbc76eb20b5ae to your computer and use it in GitHub Desktop.
install pyenv
#!/bin/sh
echo '--- installing pyenv from github ---'
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 && \
echo '--- pyenv installed, restarting $SHELL---'
exec "$SHELL"
echo '--- done! install python via "pyenv install 3.7.4" ---'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment