Created
April 27, 2020 08:13
-
-
Save alex3165/6a5154d17445677dbc288c43799a0a9b to your computer and use it in GitHub Desktop.
Set python environment to current folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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