Skip to content

Terminal activate conda base environment just after activating the right environment #18868

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

Closed
Lawiss opened this issue Apr 6, 2022 · 1 comment
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug

Comments

@Lawiss
Copy link

Lawiss commented Apr 6, 2022

Issue Type: Bug

Behaviour

Expected vs. Actual

Hello,
When I select my conda env for the workspace, I expect that each terminal session activate this environment. In the past it worked well. But since a few days I have a strange bhaviour : the terminal execute the command conda activtae myenv then just after source /Users/luis/miniforge3/bin/activate reactivating base env. (see in screenshoot)

Steps to reproduce:

Enregistrement de l’écran 2022-04-06 à 12 03 22(1)

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.9
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Default
User Settings


defaultLS: {"defaultLSType":"Pylance"}

downloadLanguageServer: true

envFile: "<placeholder>"

venvPath: "<placeholder>"

venvFolders: "<placeholder>"

condaPath: "<placeholder>"

pipenvPath: "<placeholder>"

poetryPath: "<placeholder>"

languageServer: "Pylance"

linting
• enabled: true
• cwd: "<placeholder>"
• Flake8Args: "<placeholder>"
• flake8Enabled: false
• flake8Path: "<placeholder>"
• lintOnSave: true
• banditArgs: "<placeholder>"
• banditEnabled: false
• banditPath: "<placeholder>"
• mypyArgs: "<placeholder>"
• mypyEnabled: false
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: false
• pycodestylePath: "<placeholder>"
• prospectorArgs: "<placeholder>"
• prospectorEnabled: false
• prospectorPath: "<placeholder>"
• pydocstyleArgs: "<placeholder>"
• pydocstyleEnabled: false
• pydocstylePath: "<placeholder>"
• pylamaArgs: "<placeholder>"
• pylamaEnabled: false
• pylamaPath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"

sortImports
• args: "<placeholder>"
• path: "<placeholder>"

formatting
• autopep8Args: "<placeholder>"
• autopep8Path: "<placeholder>"
• provider: "black"
• blackArgs: "<placeholder>"
• blackPath: "<placeholder>"
• yapfArgs: "<placeholder>"
• yapfPath: "<placeholder>"

testing
• cwd: "<placeholder>"
• debugPort: 3000
• nosetestArgs: "<placeholder>"
• nosetestsEnabled: undefined
• nosetestPath: "<placeholder>"
• promptToConfigure: true
• pytestArgs: "<placeholder>"
• pytestEnabled: false
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true

terminal
• activateEnvironment: true
• executeInFileDir: "<placeholder>"
• launchArgs: "<placeholder>"

experiments
• enabled: true
• optInto: []
• optOutFrom: []

tensorBoard
• logDirectory: "<placeholder>"

Extension version: 2022.4.0
VS Code version: Code 1.66.0 (Universal) (e18005f0f1b33c29e81d732535d8c0e47cafb0b5, 2022-03-30T05:50:04.419Z)
OS version: Darwin arm64 21.4.0
Restricted Mode: No

System Info
Item Value
CPUs Apple M1 Pro (8 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 5, 5, 5
Memory (System) 16.00GB (0.08GB free)
Process Argv --crash-reporter-id a129d0b2-ecd6-4f0a-8ff3-d67e5b6507fa
Screen Reader yes
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
testflight:30433670
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30466689
pynewfile477:30463512

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Apr 6, 2022
@karthiknadig karthiknadig changed the title Terminal activate conda base environmnent just after activating the right environment Terminal activate conda base environment just after activating the right environment Apr 6, 2022
@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug triage area-environments Features relating to handling interpreter environments and removed triage-needed Needs assignment to the proper sub-team labels Apr 6, 2022
@karrtikr
Copy link

karrtikr commented Apr 6, 2022

Hi @Lawiss , thanks for reaching out.

This looks like an issue with ZSH shell itself. As you can notice the two commands are sent in sequence, but the shell for some reason is executing the second command first, this should be reported on https://github.com/microsoft/vscode.

We'll no longer be sending two commands once #15818 is taken care of, so that'll also fix the issue on your end, closing in favor of that.

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 bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants