Skip to content

Automatically select interpreter when VIRTUAL_ENV is set #2124

Closed as not planned

Description

When a virtual environment is activated the VIRTUAL_ENV environment variable is set to the location of the virtual environment. We could pick up on this and use it as the implicit value of python.pythonPath when that setting has not already been set.

Activity

  1. alexwhittemore commented on Aug 3, 2018

    @alexwhittemore
  2. brettcannon commented on Aug 3, 2018

    @brettcannon
    Author
  3. alexwhittemore commented on Aug 4, 2018

    @alexwhittemore
  4. brettcannon commented on Aug 9, 2018

    @brettcannon
    Author
  5. alexwhittemore commented on Aug 9, 2018

    @alexwhittemore

    You might have just gone above my head a little; I don't really understand the difference. But it does appear to be the case that it's not quite accurate, at least not in the cases that a user would recognize. Namely, when I put in place my goofy hack from the latest comment at #2333, it all "Just Works" the way I expect/think it should. It seems to me like re-activating a detected virtualenv in ~/.bash_profile wouldn't work so effectively if what you're saying is true. Does that make any sense?

  6. brettcannon commented on Aug 9, 2018

    @brettcannon
    MemberAuthor

    I get it, but I think we might be talking about different things in terms of how/where code is being executed.

  7. karrtikr commented on Dec 22, 2022

    @karrtikr

    Closing as dup of #18178.

  8. locked as resolved and limited conversation to collaborators on Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-environmentsFeatures relating to handling interpreter environmentsfeature-requestRequest for new features or functionalityneeds PRReady to be worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions