How to Activate virtualenv in a Script

Let’s say you want to write a script that executes a command inside a virtualenv, you can easily do this by using the source command available in Bash. Here’s a sample script

source "/path/to/your/virtualenv/bin/activate"

Leave a Reply

Your email address will not be published. Required fields are marked *