Skip to content

Activate Python virtualenv in current shell #1785

Answered by casey
ducdetronquito asked this question in Q&A
Discussion options

You must be logged in to vote

Currently, there isn't a good way to do this. Each recipe line runs in a new shell, so environment variables loaded in one line don't propagate to the next.

You can use a shebang recipe, which runs as a script, to get around this:

dev:
    #!/usr/bin/env bash
    source env/bin/activate

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ducdetronquito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants