Skip to content

Instantly share code, notes, and snippets.

@glefait
Created January 31, 2018 12:38
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 glefait/657f347071e7741af8f53510b4c461b3 to your computer and use it in GitHub Desktop.
Save glefait/657f347071e7741af8f53510b4c461b3 to your computer and use it in GitHub Desktop.
delete and recreate virtualenv then install current python package
alias delgenvenv="current_env=`pwd | sed -nr 's#^.*?/([^/]+)$#\1#p'` \
&& echo \"destroy virtualenv $current_env\" \
&& (deactivate || echo 'skip deactivate') \
&& (rm -Rf ~/.virtualenvs/$current_env/ || echo 'skip rm') \
&& virtualenv ~/.virtualenvs/$current_env \
&& source ~/.virtualenvs/$current_env/bin/activate \
&& pip install -r requirements.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment