Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
luabud opened this issue Mar 17, 2020 · 7 comments
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality

Comments

@luabud
Copy link
Member

luabud commented Mar 17, 2020

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)

@luabud luabud added feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team needs decision labels Mar 17, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Mar 17, 2020
@luabud luabud added triage-needed Needs assignment to the proper sub-team area-environments Features relating to handling interpreter environments labels Mar 17, 2020
@luabud
Copy link
Member Author

luabud commented Mar 17, 2020

Related to #5344 and #10668

@thomsentner
Copy link

thomsentner commented Apr 22, 2020

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.

@luabud
Copy link
Member Author

luabud commented Apr 22, 2020

@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.

@iutlu
Copy link

iutlu commented May 11, 2020

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

@luabud
Copy link
Member Author

luabud commented Jun 9, 2020

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

@karrtikr
Copy link

karrtikr commented Jul 31, 2022

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

@karrtikr
Copy link

This should no longer be needed with #11039.

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2023
@github-actions github-actions bot removed the needs PR Ready to be worked on label Sep 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants