Skip to content

Instantly share code, notes, and snippets.

@alex3165
Created April 27, 2020 08:13
Show Gist options
  • Save alex3165/6a5154d17445677dbc288c43799a0a9b to your computer and use it in GitHub Desktop.
Save alex3165/6a5154d17445677dbc288c43799a0a9b to your computer and use it in GitHub Desktop.
Set python environment to current folder
#!/bin/bash
pystp() {
DIR="./env"
if [ ! -d "$DIR" ]; then
python3 -m venv env
fi
source env/bin/activate
REQUIREMENTS="./requirements.txt"
if [ -f "$REQUIREMENTS" ]; then
pip install -r requirements.txt
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment