-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Comments
Might be related to #15703 |
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? |
Unfortunately the same behavior in PowerShell Core 6
The environment activation works perfectly with
|
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" |
@solaris7x Can you try setting the value of the |
It seems the problem is related to Vscode terminal profiles If the 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 profilePython Info Relevant
Python Info Whole Output
|
Thank you for finding the root cause @solaris7x! Just to confirm, did you add both |
Both entries are valid in user settings as well as workspace settings. Thus any combination can be used:
I would suggest adding |
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
python.languageServer
setting: PylanceExpected behaviour
New powershell 7 terminal has environment activated
Actual behaviour
Python extension provides incorrect command to activate environment
Steps to reproduce:
Workspace settings :
The text was updated successfully, but these errors were encountered: