Skip to content

VirtualEnv in Python doesn't trigger postactivate #9917

@1st

Description

@1st

I've a file with post activate logic located at ~/.virtualenvs/env_name/bin/postactivate that can contain something like this:

export ENV_NAME=local
cd ./src

It works file if I use workon env_name command from Virtual Env Wrapper.

But when I create a new terminal inside VSCode it activate the env like this:
source /Users/anton/.virtualenvs/env_name/bin/activate

And problem here that postactivate script isn't run.

It will be good to use virualenvwrapper inside VS Code or alternatively add extra commands that will be executed after activation of the python virtual env.

If it's already a way how to execute additional script after activation of the virtual env - please let me know. I didn't find such property in VS Code settings file.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-environmentsFeatures relating to handling interpreter environmentsfeature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions