xliiv
xliiv

Reputation: 5629

How to create script which activates virtualenv?

I'd like to have a script which activates particular virtualenv.

I did this:

file: go.sh

#!/bin/bash
source environments/admin2/bin/activate

but after execution it virtualenv is not activated.

Perhaps it dies after script execution. I need the script that could do activation in current bash/zsh, because now I'm forced to this ugly routine.

After signing in to ssh session do:

cat go.sh

and then copy paste the result O_o

Upvotes: 0

Views: 64

Answers (1)

Aleks-Daniel Jakimenko-A.
Aleks-Daniel Jakimenko-A.

Reputation: 10643

Try executing go.sh this way:

source go.sh

Upvotes: 1

Related Questions