Created
April 29, 2017 09:48
-
-
Save clamytoe/adfba08b99df393183f874b3175946a7 to your computer and use it in GitHub Desktop.
Creates a python3 virtual environment and install any dependencies if the requirements.txt is found in the directory from which it is being executed.
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
| #!/usr/bin/env bash | |
| # it won't stay in the virtual env so you will | |
| # have to activate the environment by hand: | |
| # | |
| # source venv/bin/activate | |
| python3 -m venv venv | |
| source venv/bin/activate | |
| if [ -f "requirements.txt" ]; 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