Repository navigation
Conda fails to activate in fish shell when in pythonTerminalEnvVarActivation experiment #21895
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
triage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
Testing #21298
Reproduced using the python codespace.
Created a conda environment via the terminal and can activate it via conda activate <name> but fails to auto activate
2023-08-29 19:40:45.761 [debug] Clearing context for python dependencies not installed: /workspaces/vscode-python/tpiVenv/bin/activate.fish
2023-08-29 19:40:47.119 [debug] Shell path '', base path ''
2023-08-29 19:40:47.119 [debug] Shell path identified as shell 'other'
2023-08-29 19:40:47.119 [debug] Terminal name '' identified as shell 'other'
2023-08-29 19:40:47.119 [debug] [object Object]. Shell identified as other (Terminal name is )
2023-08-29 19:40:47.119 [debug] Shell path '/usr/bin/fish', base path '/usr/bin/fish'
2023-08-29 19:40:47.119 [debug] Shell path identified as shell 'fish'
2023-08-29 19:40:47.119 [debug] Terminal shell path '/usr/bin/fish' identified as shell 'fish'
2023-08-29 19:40:47.119 [debug] [object Object]. Shell identified as fish (Terminal name is )
2023-08-29 19:40:47.119 [debug] Shell identified as 'fish'
2023-08-29 19:40:47.119 [debug] Cached data exists KeyPrefix=Cache_Method_Output_b._selectIfLaunchedViaActivatedEnv-Args=true
2023-08-29 19:40:47.120 [debug] Found cached env for /workspaces/vscode-python/tpiVenv/bin/python
2023-08-29 19:40:47.120 [debug] Resolved /workspaces/vscode-python/tpiVenv/bin/python from cache: {"name":"tpiVenv","location":"/workspaces/vscode-python/tpiVenv","kind":"virt-venv","executable":{"filename":"/workspaces/vscode-python/tpiVenv/bin/python","sysPrefix":"/workspaces/vscode-python/tpiVenv","ctime":1693335931477,"mtime":1693335931477},"searchLocation":{"$mid":1,"fsPath":"/workspaces/vscode-python/tpiVenv","path":"/workspaces/vscode-python/tpiVenv","scheme":"file"},"display":"Python 3.11.3 ('tpiVenv': venv)","version":{"major":3,"minor":11,"micro":3,"release":{"level":"final","serial":0},"sysVersion":"3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0]"},"arch":3,"distro":{"org":""},"source":[],"type":"Virtual","id":"/workspaces/vscode-python/tpiVenv/bin/python","detailedDisplayName":"Python 3.11.3 ('tpiVenv': venv)"}
2023-08-29 19:40:47.120 [debug] Cached data exists KeyPrefix=Cache_Method_Output_b._selectIfLaunchedViaActivatedEnv-Args=true
2023-08-29 19:40:47.120 [debug] Found cached env for /workspaces/vscode-python/tpiVenv/bin/python
2023-08-29 19:40:47.120 [debug] Resolved /workspaces/vscode-python/tpiVenv/bin/python from cache: {"name":"tpiVenv","location":"/workspaces/vscode-python/tpiVenv","kind":"virt-venv","executable":{"filename":"/workspaces/vscode-python/tpiVenv/bin/python","sysPrefix":"/workspaces/vscode-python/tpiVenv","ctime":1693335931477,"mtime":1693335931477},"searchLocation":{"$mid":1,"fsPath":"/workspaces/vscode-python/tpiVenv","path":"/workspaces/vscode-python/tpiVenv","scheme":"file"},"display":"Python 3.11.3 ('tpiVenv': venv)","version":{"major":3,"minor":11,"micro":3,"release":{"level":"final","serial":0},"sysVersion":"3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0]"},"arch":3,"distro":{"org":""},"source":[],"type":"Virtual","id":"/workspaces/vscode-python/tpiVenv/bin/python","detailedDisplayName":"Python 3.11.3 ('tpiVenv': venv)"}
2023-08-29 19:40:47.220 [debug] Command sent to terminal: source /workspaces/vscode-python/tpiVenv/bin/activate.fish
2023-08-29 19:40:47.220 [info] Send text to terminal: source /workspaces/vscode-python/tpiVenv/bin/activate.fish
2023-08-29 19:40:48.947 [debug] Cached data exists KeyPrefix=Cache_Method_Output_b._selectIfLaunchedViaActivatedEnv-Args=true
2023-08-29 19:40:48.947 [debug] Cached data exists KeyPrefix=Cache_Method_Output_b._selectIfLaunchedViaActivatedEnv-Args=true
2023-08-29 19:40:48.947 [debug] Clearing context for python dependencies not installed: ms-python.python.Python
2023-08-29 19:40:48.947 [debug] Found cached env for /workspaces/vscode-python/tpiVenv/bin/python
2023-08-29 19:40:48.947 [debug] Found cached env for /workspaces/vscode-python/tpiVenv/bin/python
2023-08-29 19:40:48.947 [debug] Resolved /workspaces/vscode-python/tpiVenv/bin/python from cache: {"name":"tpiVenv","location":"/workspaces/vscode-python/tpiVenv","kind":"virt-venv","executable":{"filename":"/workspaces/vscode-python/tpiVenv/bin/python","sysPrefix":"/workspaces/vscode-python/tpiVenv","ctime":1693335931477,"mtime":1693335931477},"searchLocation":{"$mid":1,"fsPath":"/workspaces/vscode-python/tpiVenv","path":"/workspaces/vscode-python/tpiVenv","scheme":"file"},"display":"Python 3.11.3 ('tpiVenv': venv)","version":{"major":3,"minor":11,"micro":3,"release":{"level":"final","serial":0},"sysVersion":"3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0]"},"arch":3,"distro":{"org":""},"source":[],"type":"Virtual","id":"/workspaces/vscode-python/tpiVenv/bin/python","detailedDisplayName":"Python 3.11.3 ('tpiVenv': venv)"}
2023-08-29 19:40:48.947 [debug] Resolved /workspaces/vscode-python/tpiVenv/bin/python from cache: {"name":"tpiVenv","location":"/workspaces/vscode-python/tpiVenv","kind":"virt-venv","executable":{"filename":"/workspaces/vscode-python/tpiVenv/bin/python","sysPrefix":"/workspaces/vscode-python/tpiVenv","ctime":1693335931477,"mtime":1693335931477},"searchLocation":{"$mid":1,"fsPath":"/workspaces/vscode-python/tpiVenv","path":"/workspaces/vscode-python/tpiVenv","scheme":"file"},"display":"Python 3.11.3 ('tpiVenv': venv)","version":{"major":3,"minor":11,"micro":3,"release":{"level":"final","serial":0},"sysVersion":"3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0]"},"arch":3,"distro":{"org":""},"source":[],"type":"Virtual","id":"/workspaces/vscode-python/tpiVenv/bin/python","detailedDisplayName":"Python 3.11.3 ('tpiVenv': venv)"}
2023-08-29 19:40:48.949 [debug] Cached data exists KeyPrefix=Cache_Method_Output_E.ensureEnvironmentContainsPython-Args="/workspaces/vscode-python/tpiVenv/bin/python"-Arg-Separator-undefined
2023-08-29 19:40:48.995 [debug] Clearing context for python dependencies not installed: ms-python.python.Python
2023-08-29 19:40:49.245 [debug] Cached data exists KeyPrefix=Cache_Method_Output_b._selectIfLaunchedViaActivatedEnv-Args=true
2023-08-29 19:40:49.245 [debug] Clearing context for python dependencies not installed: /workspaces/vscode-python/tpiVenv/bin/activate.fish
2023-08-29 19:40:49.246 [debug] Found cached env for /workspaces/vscode-python/tpiVenv/bin/python
2023-08-29 19:40:49.246 [debug] Resolved /workspaces/vscode-python/tpiVenv/bin/python from cache: {"name":"tpiVenv","location":"/workspaces/vscode-python/tpiVenv","kind":"virt-venv","executable":{"filename":"/workspaces/vscode-python/tpiVenv/bin/python","sysPrefix":"/workspaces/vscode-python/tpiVenv","ctime":1693335931477,"mtime":1693335931477},"searchLocation":{"$mid":1,"fsPath":"/workspaces/vscode-python/tpiVenv","path":"/workspaces/vscode-python/tpiVenv","scheme":"file"},"display":"Python 3.11.3 ('tpiVenv': venv)","version":{"major":3,"minor":11,"micro":3,"release":{"level":"final","serial":0},"sysVersion":"3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0]"},"arch":3,"distro":{"org":""},"source":[],"type":"Virtual","id":"/workspaces/vscode-python/tpiVenv/bin/python","detailedDisplayName":"Python 3.11.3 ('tpiVenv': venv)"}
2023-08-29 19:40:49.246 [debug] Cached data exists KeyPrefix=Cache_Method_Output_E.ensureEnvironmentContainsPython-Args="/workspaces/vscode-python/tpiVenv/bin/python"-Arg-Separator-{"uri":{"$mid":1,"fsPath":"/workspaces/vscode-python","external":"file:///workspaces/vscode-python","path":"/workspaces/vscode-python","scheme":"file"},"name":"vscode-python","index":0}
2023-08-29 19:40:49.294 [debug] Clearing context for python dependencies not installed: /workspaces/vscode-python/tpiVenv/bin/activate.fish
2023-08-29 19:40:49.852 [debug] Cached data exists KeyPrefix=Cache_Method_Output_b._selectIfLaunchedViaActivatedEnv-Args=true
2023-08-29 19:40:49.852 [debug] Cached data exists KeyPrefix=Cache_Method_Output_b._selectIfLaunchedViaActivatedEnv-Args=true
2023-08-29 19:40:49.852 [debug] Clearing context for python dependencies not installed: ms-python.python.Python
2023-08-29 19:40:49.852 [debug] Found cached env for /workspaces/vscode-python/tpiVenv/bin/python
2023-08-29 19:40:49.852 [debug] Found cached env for /workspaces/vscode-python/tpiVenv/bin/python
2023-08-29 19:40:49.852 [debug] Resolved /workspaces/vscode-python/tpiVenv/bin/python from cache: {"name":"tpiVenv","location":"/workspaces/vscode-python/tpiVenv","kind":"virt-venv","executable":{"filename":"/workspaces/vscode-python/tpiVenv/bin/python","sysPrefix":"/workspaces/vscode-python/tpiVenv","ctime":1693335931477,"mtime":1693335931477},"searchLocation":{"$mid":1,"fsPath":"/workspaces/vscode-python/tpiVenv","path":"/workspaces/vscode-python/tpiVenv","scheme":"file"},"display":"Python 3.11.3 ('tpiVenv': venv)","version":{"major":3,"minor":11,"micro":3,"release":{"level":"final","serial":0},"sysVersion":"3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0]"},"arch":3,"distro":{"org":""},"source":[],"type":"Virtual","id":"/workspaces/vscode-python/tpiVenv/bin/python","detailedDisplayName":"Python 3.11.3 ('tpiVenv': venv)"}
2023-08-29 19:40:49.852 [debug] Resolved /workspaces/vscode-python/tpiVenv/bin/python from cache: {"name":"tpiVenv","location":"/workspaces/vscode-python/tpiVenv","kind":"virt-venv","executable":{"filename":"/workspaces/vscode-python/tpiVenv/bin/python","sysPrefix":"/workspaces/vscode-python/tpiVenv","ctime":1693335931477,"mtime":1693335931477},"searchLocation":{"$mid":1,"fsPath":"/workspaces/vscode-python/tpiVenv","path":"/workspaces/vscode-python/tpiVenv","scheme":"file"},"display":"Python 3.11.3 ('tpiVenv': venv)","version":{"major":3,"minor":11,"micro":3,"release":{"level":"final","serial":0},"sysVersion":"3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0]"},"arch":3,"distro":{"org":""},"source":[],"type":"Virtual","id":"/workspaces/vscode-python/tpiVenv/bin/python","detailedDisplayName":"Python 3.11.3 ('tpiVenv': venv)"}
2023-08-29 19:40:49.853 [debug] Cached data exists KeyPrefix=Cache_Method_Output_E.ensureEnvironmentContainsPython-Args="/workspaces/vscode-python/tpiVenv/bin/python"-Arg-Separator-undefined
2023-08-29 19:40:49.901 [debug] Clearing context for python dependencies not installed: ms-python.python.Python
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
triage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team

Activity
lramos15 commentedon Aug 29, 2023
Environemnt contributions
karrtikr commentedon Aug 29, 2023
This doesn't look like the complete debug logs. Also
seems to indicate that we're not in
pythonTerminalEnvVarActivationexperiment.lramos15 commentedon Aug 29, 2023
Maybe I need to start and start the codespace?
I reloaded the window and am just doing this through the browser connected to the codespace
karrtikr commentedon Aug 29, 2023
Ah, in codespaces you need to set the Remote settings to use the experiment, not User setting.
lramos15 commentedon Aug 30, 2023
Okay the error is different now, but I still don't think it worked
Output:
karrtikr commentedon Aug 30, 2023
This was already fixed in
mainbranch some while ago, we especially ignore setting these env vars:vscode-python/src/client/interpreter/activation/terminalEnvVarCollectionService.ts
Lines 313 to 315 in 30e26c2
It's leading to me believe that you're probably not using the latest pre-release of the extension. The logs doesn't seem to be complete, so I'm unable to confirm this.
lramos15 commentedon Aug 30, 2023
karrtikr commentedon Aug 30, 2023
Discussed offline, everything seems to work as expected for fish shell, confirmed we run into microsoft/vscode#184009.
[-]Conda fails to activate in fish shell[/-][+]Conda fails to activate in fish shell when in `pythonTerminalEnvVarActivation` experiment[/+]