Skip to content

Instantly share code, notes, and snippets.

@NekoTashi
Created October 12, 2018 14:54
Show Gist options
  • Save NekoTashi/ea6b3480186fbf1a7a57ce5929228176 to your computer and use it in GitHub Desktop.
Save NekoTashi/ea6b3480186fbf1a7a57ce5929228176 to your computer and use it in GitHub Desktop.
How to activate venv inside a bash script.
#!/bin/sh
set -e
cd "<virtualenv_dir>"
source bin/activate
# -- Your code here!
@NekoTashi
Copy link
Author

#!/bin/sh
set -e

cd "<virtualenv_dir>"
source bin/activate

python my_python_script.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment