Repository navigation
Prompt users to start vscode from anaconda prompt when we detect conda env was selected #10626
Description
Activity
- addedfeature-requestRequest for new features or functionalityRequest for new features or functionalitytriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Mar 17, 2020 - ghost removedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Mar 17, 2020 - addedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-teamarea-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environments
on Mar 17, 2020 - removedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Mar 18, 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.
Reacted by ronif and Nivesh Dommarajuthomsentner 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.
Hello, would this solution work in conjunction with
terminal.integrated.inheritEnv = false?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:
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
$PATHenvironment variable to figure out the path to conda install. For eg. it could be~/miniconda3or/opt/condain 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
This should no longer be needed with #11039.
Reacted by Luciana Abud- locked as resolved and limited conversation to collaborators
on Oct 14, 2023

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)