Repository navigation
Terminal activate venv with prefix of folder name, not my setting prefix. And I can't actually deactivate it. #22895
Description
Type: Bug
Behaviour
Expected vs. Actual
When I startup or open a new terminal in vscode, it activate venv of folder with my chosen interpreter, but with prefix of floder name(.env) not my setting(development), and i can re-activate (development) venv. It looks really wired. And when I deactivate the venv, it seems like re-activating a "default" terminal, for when I ctrl+D, it back to (.env) venv.
Btw after I disable python>Terminal: Activate Environment in settings, venv(.env) is still activitated when I open a Terminal. I'm not sure if it's a bug or I misunderstand this term.
Steps to reproduce:
- startup or open a new terminal under a folder with a venv chosen as the interpreter.
- deactivate activated venv
eba is my alias of source .env/bin/activate

Diagnostic data
- Python version (& distribution if applicable, e.g. Anaconda): 3.11.8
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
- Value of the
python.languageServersetting: Default
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
No current configuration is defined in the workspace state. Assuming 'Default'.
No target defined in the workspace state. Assuming 'Default'.
Dropping various extension output files at /home/htao_ubuntu/.config/Code/User/workspaceStorage/20e73bb9fa14a8f202a7fbfc72d8feae/ms-vscode.makefile-tools
Logging level: Normal
Configurations cached at /home/htao_ubuntu/.config/Code/User/workspaceStorage/20e73bb9fa14a8f202a7fbfc72d8feae/ms-vscode.makefile-tools/configurationCache.log
No path to the makefile is defined in the settings file.
No folder path to the makefile is defined in the settings file.
Always pre-configure: false
Always post-configure: false
Dry-run switches: '--always-make', '--keep-going', '--print-directory'
No current launch configuration is set in the workspace state.
Default launch configuration: MIMode = undefined,
miDebuggerPath = undefined,
stopAtEntry = undefined,
symbolSearchPath = undefined
Configure on open: true
Configure on edit: true
Configure after command: true
Only .PHONY targets: false
Save before build or configure: true
Build before launch: true
Clear output before build: true
Ignore directory commands: true
compile_commands.json path: null
Deduced command 'make ' for configuration "Default"
The makefile entry point was not found. Make sure it exists at the location defined by makefile.makefilePath, makefile.configurations[].makefilePath, makefile.makeDirectory, makefile.configurations[].makeDirectoryor in the root of the workspace.
User Settings
languageServer: "Pylance"
Extension version: 2024.0.1
VS Code version: Code 1.86.1 (31c37ee8f63491495ac49e43b8544550fbae4533, 2024-02-07T09:07:19.849Z)
OS version: Linux x64 6.5.0-17-generic
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | AMD Ryzen 9 7950X3D 16-Core Processor (32 x 3138) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off 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: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | 0, 0, 0 |
| Memory (System) | 93.48GB (88.27GB free) |
| Process Argv | . --crash-reporter-id 4a154e1f-0549-4499-8f45-d96bbae1fee0 |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | ubuntu |
| XDG_CURRENT_DESKTOP | Unity |
| XDG_SESSION_DESKTOP | ubuntu |
| XDG_SESSION_TYPE | wayland |
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
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
pythontbext0:30879054
accentitlementst:30887150
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
fegfb526:30961430
7j2b6412:30949929
Activity
karrtikr commentedon Feb 12, 2024
Please provide the debug logs which can help diagnose the issue:
Developer: Set log levelcommandTraceDeveloper: Reload WindowcommandOutput for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)WiC-htao commentedon Feb 16, 2024
karrtikr commentedon Feb 28, 2024
Could you clarify what you mean by "setting(development)", where is that setting set?
karrtikr commentedon Feb 28, 2024
This should likely be fixed by #22128
WiC-htao commentedon Mar 1, 2024
the prefix I set for this virtual environment, which is "development".
karrtikr commentedon Mar 1, 2024
where did you set it?
WiC-htao commentedon Mar 1, 2024
python -m venv .env --prompt developmentkarrtikr commentedon Mar 15, 2024
Thanks. This should be fixed with #23080, closing as duplicate of #22956.