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

Python Virtual Env activates with two parenthesis #23205

Closed
jascomp opened this issue Apr 6, 2024 · 7 comments
Closed

Python Virtual Env activates with two parenthesis #23205

jascomp opened this issue Apr 6, 2024 · 7 comments
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@jascomp
Copy link

jascomp commented Apr 6, 2024

Type: Bug

Behaviour

After the VSCode March 2024 Update I noticed that when I open a new Terminal with automatic Python environment activation it is showing the prompt with two sets of parenthesis:

((.venv) ) myuser@ubuntu23:~/src/myapp$

Where before it was:

(.venv) myuser@ubuntu23:~/src/myapp$

The above is also what I get when I activate the environment manually:

source .venv/bin/activate

I'm running the Terminal in VSCode through a remote SSH connection.

There's been no changes to the host box and my application seems to run without issues, but it's just odd.

I've tried removing the .vscode-server and .vscode directories on the remote host and letting VSCode recreate them.

Steps to reproduce:

  1. Auto activate Python environment in remote SSH Terminal

VS Code version: Code 1.88.0 (5c3e652f63e798a5ac2f31ffd0d863669328dc4c, 2024-04-03T13:26:18.741Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 6.5.0-26-generic

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


languageServer: "Pylance"

Installed Extensions
Extension Name Extension Id Version
Docker ms-azuretools.vscode-docker 1.29.0
GitHub Copilot GitHub.copilot 1.178.0
GitHub Copilot Chat GitHub.copilot-chat 0.14.0
isort ms-python.isort 2023.10.1
JavaScript Debugger ms-vscode.js-debug 1.88.0
Pretty XML PrateekMahendrakar.prettyxml 4.4.1
Pylance ms-python.vscode-pylance 2024.4.1
Python ms-python.python 2024.4.0
Python Debugger ms-python.debugpy 2024.4.0
Table Visualizer for JavaScript Profiles ms-vscode.vscode-js-profile-table 1.0.8
System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-1255U (12 x 2611)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 63.69GB (40.98GB free)
Process Argv --crash-reporter-id 464d6f4d-8cf9-4523-82f9-3fc9adea2ade
Screen Reader no
VM 0%
Item Value
Remote SSH: local.linux.peaketl.com
OS Linux x64 6.5.0-26-generic
CPUs Intel(R) Core(TM) i5-7500T CPU @ 2.70GHz (4 x 3108)
Memory (System) 31.22GB (27.61GB free)
VM 0%
Extensions (19)
Extension Author (truncated) Version
python ms- 2024.4.0
jupyter-keymap ms- 1.1.2
remote-containers ms- 0.354.0
remote-ssh ms- 0.110.1
remote-ssh-edit ms- 0.86.0
remote-wsl ms- 0.88.0
vscode-remote-extensionpack ms- 0.25.0
remote-explorer ms- 0.4.3
remote-server ms- 1.5.1
es7-react-js-snippets rod 1.9.3
pdf tom 1.2.2
copilot Git 1.178.0
copilot-chat Git 0.14.0
vscode-docker ms- 1.29.0
debugpy ms- 2024.4.0
isort ms- 2023.10.1
python ms- 2024.4.0
vscode-pylance ms- 2024.4.1
prettyxml Pra 4.5.0
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
gee8j676:31009558
dsvsc021:30996838
g1icg217:30999571
vstestt:31010172

@jascomp jascomp changed the title Python Virtual Env activates with two parathesis Python Virtual Env activates with two parenthesis Apr 6, 2024
@maxbobkov
Copy link

maxbobkov commented Apr 6, 2024

I have the same problem on Mac OS, when activate virtual environment and use command 'which python', terminal shows me path to global interpreter.

@vscodenpa vscodenpa added the triage-needed Needs assignment to the proper sub-team label Apr 6, 2024
@dbaeumer dbaeumer assigned karthiknadig and unassigned dbaeumer Apr 8, 2024
@dbaeumer dbaeumer removed the triage-needed Needs assignment to the proper sub-team label Apr 8, 2024
@blazerzar
Copy link

Same problem for me on Mac OS.

I have the same problem on Mac OS, when activate virtual environment and use command 'which python', terminal shows me path to global interpreter.

For me, which python works correctly, but I have noticed that deactivate command does not work. I get zsh: permission denied: deactivate error.

Downgrading the Python extension to v2024.2.1 fixed the problem.

@karthiknadig
Copy link
Member

Duplicate of #23193

Fixed via #23201

@karthiknadig karthiknadig transferred this issue from microsoft/vscode Apr 8, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Apr 8, 2024
@jascomp
Copy link
Author

jascomp commented Apr 9, 2024

Confirm deactivate permission denied issue reported by @blazerzar

@karthiknadig
Copy link
Member

@jascomp @blazerzar Deactivate permission error tracking issue #23195

@psonis-certh
Copy link

Pre-release version (v2024.5.11002139) fixed the double parenthesis issue for me.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

8 participants