Skip to content

inheritEnv false is needed for conda environments but true is needed for vscode-R #16301

@JulioV

Description

@JulioV

Environment data

  • VS Code version: 1.56.2
  • Extension version (available under the Extensions sidebar): v2021.5.842923320
  • OS and version: 11.3.1 (20E241)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.79
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda 4.8.4
  • Value of the python.languageServer setting: pylance

Apologies if this should be posted in https://github.com/microsoft/vscode or somewhere else. I do not fully understand the role of "terminal.integrated.inheritEnv"

The problem is that inheritEnv has to be False for me to be able to activate conda from the terminal (#5764). However, the vscode-R extension needs inheritEnv set to True so it can work with https://github.com/randy3k/radian (see REditorSupport/vscode-R#273).

The reason I am reporting this as a bug is that inheritEnv can be set to True and I can get my conda environment to work by running conda deactivate twice and then activating my conda environment. Maybe this points to a fix for this problem without disabling inheritEnv?

As expected from #5764, when inheritEnv is True and I try to activate my conda environment from the terminal the environment seems to be active (it appears at the start of my terminal prompt) but it is actually pointing to my machine's default Python binary (2.7 in Mac OS) instead of the Python binary in the environment.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions