Skip to content

Prompt users to start vscode from anaconda prompt when we detect conda env was selected #10626

Description

@luabud

One way to work around many of our conda issues is to start VS Code from the Anaconda Prompt (e.g. #10444). Maybe we can add a prompt to ask users to start VS Code from Anaconda Prompt when we noticed they have a conda environment selected. (we may want to add a modal window for this)

Activity

  1. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Mar 17, 2020
  2. luabud commented on Mar 17, 2020

    @luabud
    MemberAuthor

    Related to #5344 and #10668

  3. thomsentner commented on Apr 22, 2020

    @thomsentner

    If I am correct, this would be impossible in case VSCode is used in combination with an SSH remote (extension: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh). I am myself often confronted with #5559, it would be nice if another workaround would be possible to solve this issue. The solution proposed in that bug report has been closed in favour of this solution.

  4. luabud commented on Apr 22, 2020

    @luabud
    MemberAuthor

    thomsentner that is a good point. This wouldn't work for remote scenarios. FWIW this is one proposed solution for multiple conda issues (#5344), but not for all of them.

  5. iutlu commented on May 11, 2020

    @iutlu

    Hello, would this solution work in conjunction with terminal.integrated.inheritEnv = false?

  6. luabud commented on Jun 9, 2020

    @luabud
    MemberAuthor

    good point, iutlu. For remote scenarios we'll need a different solution. This may be covered by #11039, like you pointed out there 😊

  7. karrtikr commented on Jul 31, 2022

    @karrtikr

    Workaround for remote scenarios

    In scenarios where it's not possible to launch VSCode via an activated environment, I have captured the instructions in a GIF:

    debugger

    Here're step by step instructions for the example:

    • Consider the conda environment is "hello".
    • Create a new terminal profile for the particular conda environment you intend to work with.
    • Use Open User Settings (JSON) to open user settings, and append the profile created with:
    "args": ["-c", "source <path_to_conda_install>/bin/activate hello;$SHELL"]
    
    • You can use the $PATH environment variable to figure out the path to conda install. For eg. it could be ~/miniconda3 or /opt/conda in my case.
    • Select the default profile for the terminal to be the one you configured.
    • Verify that for any new terminals you create, conda environment hello is already activated.

    cc/ thomsentner

  8. karrtikr commented on Sep 13, 2023

    @karrtikr

    This should no longer be needed with #11039.

  9. locked as resolved and limited conversation to collaborators on Oct 14, 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 functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions