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

Incorrect Terminal Activation command for Powershell 7 #15919

Closed
solaris7x opened this issue Apr 11, 2021 · 8 comments
Closed

Incorrect Terminal Activation command for Powershell 7 #15919

solaris7x opened this issue Apr 11, 2021 · 8 comments
Assignees
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@solaris7x
Copy link

TLDR; Whenever launching new shell in vscode integrated terminal , python extension tried to activate venv but provides incorrect activation command when using Powershell 7

Environment data

  • VS Code version: 1.55.1 (user setup)
  • Extension version (available under the Extensions sidebar): v2021.3.680753044
  • OS and version: Windows 10 20H2 build 19042.867
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Value of the python.languageServer setting: Pylance

Expected behaviour

New powershell 7 terminal has environment activated

PS E:\divvy\FaceAI> E:\divvy\FaceAI\.venv3.6\Scripts\Activate.ps1
(.venv3.6) PS E:\divvy\FaceAI>

Actual behaviour

Python extension provides incorrect command to activate environment

PS E:\divvy\FaceAI> source e:/divvy/FaceAI/.venv3.6/Scripts/activate
source: The term 'source' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
PS E:\divvy\FaceAI>

Steps to reproduce:

  1. Set Powershell 7 as default terminal
  2. Open a py file and set interpreter
  3. launch new integrated terminal
  4. Python extension should automatically try to activate the selected environment

Workspace settings :

{
    "terminal.integrated.shell.windows": "F:\\Program Files\\PowerShell\\7\\pwsh.exe"
}
@solaris7x solaris7x added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Apr 11, 2021
@solaris7x
Copy link
Author

Might be related to #15703

@karthiknadig karthiknadig added triage area-terminal and removed triage-needed Needs assignment to the proper sub-team labels Apr 12, 2021
@kimadeline
Copy link

Hi @solaris7x, thank you for reaching out.

This is not related to #15073, since that issue is encoding-related, while for yours it seems like it's the extension not recognizing Powershell 7 properly.

Does the virtual environment get activated properly if you use PowerShell Core 6?

@kimadeline kimadeline added the info-needed Issue requires more information from poster label Apr 13, 2021
@solaris7x
Copy link
Author

Unfortunately the same behavior in PowerShell Core 6

PowerShell 6.2.7
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS E:\divvy\FaceAI> source e:/divvy/FaceAI/.venv3.6/Scripts/activate
source : The term 'source' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ source e:/divvy/FaceAI/.venv3.6/Scripts/activate
+ ~~~~~~
+ CategoryInfo          : ObjectNotFound: (source:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
 
PS E:\divvy\FaceAI>

The environment activation works perfectly with

  • Git Bash
  • Windows 10 PowerShell v5.1
  • CMD

@brettcannon
Copy link
Member

Unfortunately I can't reproduce this with PowerShell Core 7.1.3 and I've never had issues under PowerShell Core 6.

I have:

"terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\7\\pwsh.exe"

@kimadeline
Copy link

@solaris7x Can you try setting the value of the python.logging.level user setting to info, and copy here the content of the Python channel in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)?

@solaris7x
Copy link
Author

solaris7x commented Apr 15, 2021

It seems the problem is related to Vscode terminal profiles
Edit 1: when the shell path is not the system drive and vscode does not auto detect the shell

If the terminal.integrated.shell path doesn't have matching terminal.integrated.profiles then the extention uses path of last use profile so determine activation command
Setting the terminal.integrated.shell in settings, alone isnt enough but needs a corresponding profile.

The extention works perfectly when I add a terminal profile like

{
    "terminal.integrated.shell.windows": "F:\\Program Files\\PowerShell\\7\\pwsh.exe",
    "terminal.integrated.profiles.windows": {
        "PowerShell 7": {
            "path": "F:\\Program Files\\PowerShell\\7\\pwsh.exe",
        }
    },
}

I have attatched Output>Python from before adding the terminal profile

Python Info Relevant

Info 2021-04-15 16:39:05: Shell path ''
Info 2021-04-15 16:39:05: Shell path identified as shell 'other'
Info 2021-04-15 16:39:05: Terminal name '' identified as shell 'other'
Info 2021-04-15 16:39:05: [object Object]. Shell identified as other (Terminal name is )
Info 2021-04-15 16:39:05: Shell path 'C:\Program Files\Git\bin\bash.exe'
Info 2021-04-15 16:39:05: Shell path identified as shell 'bash'
Info 2021-04-15 16:39:05: Terminal shell path 'C:\Program Files\Git\bin\bash.exe' identified as shell 'bash'
Info 2021-04-15 16:39:05: [object Object]. Shell identified as bash (Terminal name is )
Info 2021-04-15 16:39:05: Shell identified as 'bash'
Info 2021-04-15 16:39:05: Cached data exists getEnvironmentVariables, e:\divvy\FaceAI\face_landmarks.py
Info 2021-04-15 16:39:12: Cached data exists getEnvironmentVariables, extension-output-#11

Python Info Whole Output

User belongs to experiment group 'pythonaacf'
User belongs to experiment group 'pythonSendEntireLineToREPL'
User belongs to experiment group 'pythonNotDisplayLinterPrompt'
User belongs to experiment group 'pythonDiscoveryModule'
User belongs to experiment group 'pythonTensorboardExperiment'
User belongs to experiment group 'PythonPyTorchProfiler'
User belongs to experiment group 'AlwaysDisplayTestExplorer - experiment'
User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'LocalZMQKernel - experiment'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'EnableIPyWidgets - experiment'
User belongs to experiment group 'DeprecatePythonPath - experiment'
User belongs to experiment group 'RunByLine - experiment'
User belongs to experiment group 'CustomEditorSupport - control'
Info 2021-04-15 16:38:52: Shell path 'pwsh'
Info 2021-04-15 16:38:52: Shell path identified as shell 'powershellCore'
Info 2021-04-15 16:38:52: Terminal name 'pwsh' identified as shell 'powershellCore'
Info 2021-04-15 16:38:52: [object Object]. Shell identified as powershellCore (Terminal name is pwsh)
Info 2021-04-15 16:38:52: Shell identified as 'powershellCore'
Info 2021-04-15 16:38:52: Rule = settings, result = exit
Info 2021-04-15 16:38:52: autoSelectInterpreter, Class name = f, completed in 2ms, has a falsy return value, Arg 1: <Uri:e:\divvy\FaceAI>, Arg 2: <argument cannot be serialized for logging>, Return Value: undefined
Info 2021-04-15 16:38:52: Rule = settings, result = exit
Info 2021-04-15 16:38:52: Display locator refreshing progress, Class name = g, completed in 1ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:52: autoSelectInterpreter, Class name = f, completed in 4ms, has a falsy return value, Arg 1: <Uri:e:\divvy\FaceAI>, Return Value: undefined
Info 2021-04-15 16:38:52: Searching for conda.
Info 2021-04-15 16:38:52: Probing conda binary: conda
Info 2021-04-15 16:38:52: Searching for workspace virtual envs in: e:\divvy\FaceAI
Info 2021-04-15 16:38:52: Searching for workspace virtual envs in: e:\divvy\FaceAI\.direnv
Info 2021-04-15 16:38:52: Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:52: [Error: spawn conda ENOENT
	at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
	at onErrorNT (internal/child_process.js:469:16)
	at processTicksAndRejections (internal/process/task_queues.js:84:21)] {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn conda',
  path: 'conda',
  spawnargs: [ 'info', '--json' ]
}
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\AppData\Local\Microsoft\WindowsApps with pattern PythonSoftwareFoundation.Python.3.{[0-9],[0-9][0-9]}_* using chokidar
Info 2021-04-15 16:38:52: Searching for global virtual envs in: C:\Users\quest\Envs
Info 2021-04-15 16:38:52: Searching for global virtual envs in: C:\Users\quest\.direnv
Info 2021-04-15 16:38:52: Searching for global virtual envs in: C:\Users\quest\.venvs
Info 2021-04-15 16:38:52: Searching for global virtual envs in: C:\Users\quest\.virtualenvs
Info 2021-04-15 16:38:52: Searching for global virtual envs in: C:\Users\quest\.local\share\virtualenvs
Info 2021-04-15 16:38:52: Current value for rule system is {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore","displayName":"Python 3.8.5 64-bit"}
Info 2021-04-15 16:38:52: Current value for rule currentPath is {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}
Info 2021-04-15 16:38:52: Current value for rule windowsRegistry is {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}
Info 2021-04-15 16:38:52: Selected Interpreter from cachedInterpreters, {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}
Info 2021-04-15 16:38:52: Rule = workspaceEnvs, result = runNextRule
Info 2021-04-15 16:38:52: Executing next rule from workspaceEnvs
Info 2021-04-15 16:38:52: autoSelectInterpreter, Class name = f, completed in 195ms, has a falsy return value, Arg 1: <Uri:e:\divvy\FaceAI>, Return Value: undefined
Info 2021-04-15 16:38:52: Cached data exists getEnvironmentVariables, e:\divvy\FaceAI\face_landmarks.py
Info 2021-04-15 16:38:52: Display locator refreshing progress, Class name = g, completed in 1ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:52: Display locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:52: Display locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:52: Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:52: Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:52: Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:52: Selected Interpreter from currentPath, {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}
Info 2021-04-15 16:38:52: Selected Interpreter from windowsRegistry, {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}
Info 2021-04-15 16:38:52: Selected Interpreter from system, {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore","displayName":"Python 3.8.5 64-bit"}
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\Envs with pattern python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\Envs with pattern */python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\Envs with pattern */Scripts/python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.direnv with pattern python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.direnv with pattern */python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.direnv with pattern */Scripts/python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.venvs with pattern python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.venvs with pattern */python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.venvs with pattern */Scripts/python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.virtualenvs with pattern python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.virtualenvs with pattern */python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.virtualenvs with pattern */Scripts/python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.local\share\virtualenvs with pattern python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.local\share\virtualenvs with pattern */python.exe using chokidar
Info 2021-04-15 16:38:52: Start watching: C:\Users\quest\.local\share\virtualenvs with pattern */Scripts/python.exe using chokidar
Info 2021-04-15 16:38:52: setGlobalInterpreter, Class name = f, completed in 86ms, has a falsy return value, Arg 1: {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}, Arg 2: undefined, Return Value: false
Info 2021-04-15 16:38:52: setGlobalInterpreter, Class name = f, completed in 81ms, has a falsy return value, Arg 1: {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}, Arg 2: undefined, Return Value: false
Info 2021-04-15 16:38:52: setGlobalInterpreter, Class name = f, completed in 80ms, has a falsy return value, Arg 1: {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}, Arg 2: undefined, Return Value: false
Info 2021-04-15 16:38:52: setGlobalInterpreter, Class name = f, completed in 79ms, has a falsy return value, Arg 1: {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore","displayName":"Python 3.8.5 64-bit"}, Arg 2: undefined, Return Value: false
Info 2021-04-15 16:38:52: Rule = cachedInterpreters, result = runNextRule
Info 2021-04-15 16:38:52: Executing next rule from cachedInterpreters
Info 2021-04-15 16:38:52: Rule = currentPath, result = runNextRule
Info 2021-04-15 16:38:52: Executing next rule from currentPath
Info 2021-04-15 16:38:52: Rule = windowsRegistry, result = runNextRule
Info 2021-04-15 16:38:52: Executing next rule from windowsRegistry
Info 2021-04-15 16:38:52: Rule = system, result = runNextRule
Info 2021-04-15 16:38:52: Executing next rule from system
Info 2021-04-15 16:38:52: autoSelectInterpreter, Class name = f, completed in 283ms, has a falsy return value, Arg 1: <Uri:e:\divvy\FaceAI>, Return Value: undefined
Info 2021-04-15 16:38:52: autoSelectInterpreter, Class name = f, completed in 283ms, has a falsy return value, Arg 1: <Uri:e:\divvy\FaceAI>, Return Value: undefined
Info 2021-04-15 16:38:52: autoSelectInterpreter, Class name = f, completed in 283ms, has a falsy return value, Arg 1: <Uri:e:\divvy\FaceAI>, Return Value: undefined
Info 2021-04-15 16:38:52: autoSelectInterpreter, Class name = f, completed in 283ms, has a falsy return value, Arg 1: <Uri:e:\divvy\FaceAI>, Return Value: undefined
Python interpreter path: .\.venv3.6\Scripts\python.exe
Starting Pylance language server.
Info 2021-04-15 16:38:52: Workspace Virtual Environment: [added] e:\divvy\FaceAI\.venv3.6\Scripts\python.exe
Info 2021-04-15 16:38:52: Start watching: e:\divvy\FaceAI with pattern python.exe using VSCode API
Info 2021-04-15 16:38:52: Start watching: e:\divvy\FaceAI with pattern */python.exe using VSCode API
Info 2021-04-15 16:38:52: Start watching: e:\divvy\FaceAI with pattern */Scripts/python.exe using VSCode API
Info 2021-04-15 16:38:52: Start watching: e:\divvy\FaceAI\.direnv with pattern python.exe using VSCode API
Info 2021-04-15 16:38:52: Start watching: e:\divvy\FaceAI\.direnv with pattern */python.exe using VSCode API
Info 2021-04-15 16:38:52: Start watching: e:\divvy\FaceAI\.direnv with pattern */Scripts/python.exe using VSCode API
Info 2021-04-15 16:38:53: Cached data exists getEnvironmentVariables, e:\divvy\FaceAI
Info 2021-04-15 16:38:53: Starting language server, Class name = r, completed in 1125ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:53: Cached data exists getEnvironmentVariables, e:\divvy\FaceAI\face_landmarks.py
Info 2021-04-15 16:38:53: Rule = settings, result = exit
Info 2021-04-15 16:38:53: autoSelectInterpreter, Class name = f, completed in 1ms, has a falsy return value, Arg 1: undefined, Arg 2: <argument cannot be serialized for logging>, Return Value: undefined
Info 2021-04-15 16:38:53: Rule = settings, result = exit
Info 2021-04-15 16:38:53: autoSelectInterpreter, Class name = f, completed in 2ms, has a falsy return value, Arg 1: undefined, Return Value: undefined
Info 2021-04-15 16:38:53: [object Object]. Shell identified as undefined 
Info 2021-04-15 16:38:53: Shell path 'C:\Program Files\Git\bin\bash.exe'
Info 2021-04-15 16:38:53: Shell path identified as shell 'bash'
Info 2021-04-15 16:38:53: Terminal shell path 'C:\Program Files\Git\bin\bash.exe' identified as shell 'bash'
Info 2021-04-15 16:38:53: [object Object]. Shell identified as bash 
Info 2021-04-15 16:38:53: Shell identified as 'bash'
Info 2021-04-15 16:38:53: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-04-15 16:38:53: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-04-15 16:38:53: Display locator refreshing progress, Class name = g, completed in 1ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:53: Searching for conda.
Info 2021-04-15 16:38:53: Probing conda binary: conda
Info 2021-04-15 16:38:53: Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:53: [Error: spawn conda ENOENT
	at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
	at onErrorNT (internal/child_process.js:469:16)
	at processTicksAndRejections (internal/process/task_queues.js:84:21)] {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn conda',
  path: 'conda',
  spawnargs: [ 'info', '--json' ]
}
Info 2021-04-15 16:38:53: Current value for rule system is {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore","displayName":"Python 3.8.5 64-bit"}
Info 2021-04-15 16:38:53: Current value for rule currentPath is {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}
Info 2021-04-15 16:38:53: Current value for rule windowsRegistry is {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}
Info 2021-04-15 16:38:53: Selected Interpreter from cachedInterpreters, {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}
Info 2021-04-15 16:38:53: Rule = workspaceEnvs, result = runNextRule
Info 2021-04-15 16:38:53: Executing next rule from workspaceEnvs
Info 2021-04-15 16:38:53: autoSelectInterpreter, Class name = f, completed in 46ms, has a falsy return value, Arg 1: undefined, Return Value: undefined
Info 2021-04-15 16:38:53: Display locator refreshing progress, Class name = g, completed in 2ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:53: Display locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:53: Display locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:53: Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:53: Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:53: Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-04-15 16:38:53: Selected Interpreter from currentPath, {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}
Info 2021-04-15 16:38:53: Selected Interpreter from windowsRegistry, {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}
Info 2021-04-15 16:38:53: Selected Interpreter from system, {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore","displayName":"Python 3.8.5 64-bit"}
Info 2021-04-15 16:38:53: Couldn't locate the conda binary.
Info 2021-04-15 16:38:53: setGlobalInterpreter, Class name = f, completed in 35ms, has a falsy return value, Arg 1: {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}, Arg 2: undefined, Return Value: false
Info 2021-04-15 16:38:53: setGlobalInterpreter, Class name = f, completed in 28ms, has a falsy return value, Arg 1: {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}, Arg 2: undefined, Return Value: false
Info 2021-04-15 16:38:53: setGlobalInterpreter, Class name = f, completed in 26ms, has a falsy return value, Arg 1: {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore"}, Arg 2: undefined, Return Value: false
Info 2021-04-15 16:38:53: setGlobalInterpreter, Class name = f, completed in 24ms, has a falsy return value, Arg 1: {"sysPrefix":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38","envType":"Unknown","envName":"","envPath":"","path":"F:\\Users\\quest\\AppData\\Local\\Programs\\Python\\Python38\\python.exe","architecture":3,"sysVersion":"3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":[]},"companyDisplayName":"PythonCore","displayName":"Python 3.8.5 64-bit"}, Arg 2: undefined, Return Value: false
Info 2021-04-15 16:38:53: Rule = cachedInterpreters, result = runNextRule
Info 2021-04-15 16:38:53: Executing next rule from cachedInterpreters
Info 2021-04-15 16:38:53: Rule = currentPath, result = runNextRule
Info 2021-04-15 16:38:53: Executing next rule from currentPath
Info 2021-04-15 16:38:53: Rule = windowsRegistry, result = runNextRule
Info 2021-04-15 16:38:53: Executing next rule from windowsRegistry
Info 2021-04-15 16:38:53: Rule = system, result = runNextRule
Info 2021-04-15 16:38:53: Executing next rule from system
Info 2021-04-15 16:38:53: autoSelectInterpreter, Class name = f, completed in 83ms, has a falsy return value, Arg 1: undefined, Return Value: undefined
Info 2021-04-15 16:38:53: autoSelectInterpreter, Class name = f, completed in 83ms, has a falsy return value, Arg 1: undefined, Return Value: undefined
Info 2021-04-15 16:38:53: autoSelectInterpreter, Class name = f, completed in 83ms, has a falsy return value, Arg 1: undefined, Return Value: undefined
Info 2021-04-15 16:38:53: autoSelectInterpreter, Class name = f, completed in 84ms, has a falsy return value, Arg 1: undefined, Return Value: undefined
Info 2021-04-15 16:38:55: Searching for conda.
Info 2021-04-15 16:38:55: > conda --version
> conda --version
Info 2021-04-15 16:38:55: Current value for rule workspaceEnvs is {"architecture":3,"path":"e:\\sandcastle\\scratchpy\\venv\\Scripts\\python.exe","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"3.8.3-final","major":3,"minor":8,"patch":3,"prerelease":["final"],"build":[],"version":"3.8.3-final"},"sysPrefix":"e:\\sandcastle\\scratchpy\\venv","fileHash":"d82fd2eac6874f2505fe545b87a1c1ce6d5926a61db27e33422aaea9c2b31c322a2d01af855d8bad92274b01db80df432fcf20527605852e1256554244172f35","envName":"venv","type":"Venv"}
Info 2021-04-15 16:38:55: Current value for rule workspaceEnvs is {"architecture":3,"path":"e:\\sandcastle\\scratchpy\\venv\\Scripts\\python.exe","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"3.8.3-final","major":3,"minor":8,"patch":3,"prerelease":["final"],"build":[],"version":"3.8.3-final"},"sysPrefix":"e:\\sandcastle\\scratchpy\\venv","fileHash":"d82fd2eac6874f2505fe545b87a1c1ce6d5926a61db27e33422aaea9c2b31c322a2d01af855d8bad92274b01db80df432fcf20527605852e1256554244172f35","envName":"venv","type":"Venv"}
Info 2021-04-15 16:39:05: Shell path ''
Info 2021-04-15 16:39:05: Shell path identified as shell 'other'
Info 2021-04-15 16:39:05: Terminal name '' identified as shell 'other'
Info 2021-04-15 16:39:05: [object Object]. Shell identified as other (Terminal name is )
Info 2021-04-15 16:39:05: Shell path 'C:\Program Files\Git\bin\bash.exe'
Info 2021-04-15 16:39:05: Shell path identified as shell 'bash'
Info 2021-04-15 16:39:05: Terminal shell path 'C:\Program Files\Git\bin\bash.exe' identified as shell 'bash'
Info 2021-04-15 16:39:05: [object Object]. Shell identified as bash (Terminal name is )
Info 2021-04-15 16:39:05: Shell identified as 'bash'
Info 2021-04-15 16:39:05: Cached data exists getEnvironmentVariables, e:\divvy\FaceAI\face_landmarks.py
Info 2021-04-15 16:39:12: Cached data exists getEnvironmentVariables, extension-output-#11

@kimadeline
Copy link

Thank you for finding the root cause @solaris7x! Just to confirm, did you add both "terminal.integrated.shell.windows" and "terminal.integrated.profiles.windows" entries to your workspace settings or your user settings?

@solaris7x
Copy link
Author

Both entries are valid in user settings as well as workspace settings. Thus any combination can be used:

  • Both in user settings
  • Both in workspace settings
  • One in user settings and other in workspace settings

I would suggest adding "terminal.integrated.profiles.windows" to user settings as all it does it create a usable profile for vscode terminal. Then add "terminal.integrated.shell.windows" to workspace settings to set default terminal for workspace.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants