Repository navigation
Closed
Labels
triage-neededNeeds assignment to the proper sub-team
Description
Type: Bug
- Run the bash command
python -m venv venvin the root directory. - Run the "select python interpreter" command in VSCode and select "./venv/bin/python".
- Close all existing terminals in VSCode with the trash icon.
- Create a new terminal in VSCode.
which pythonwill show the local venv/bin/python path.deactivateresults in an error "/home/username/.vscode/extensions/ms-python.python-2024.6.0/python_files/deactivate/bash/deactivate: Permission denied"
Being able to deactivate the venv is a necessary feature for development.
Extension version: 2024.6.0
VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:16:23.416Z)
OS version: Linux x64 6.5.0-35-generic snap
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 2900) |
| GPU Status | 2d_canvas: unavailable_software canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: disabled_software multiple_raster_threads: enabled_on opengl: disabled_off rasterization: disabled_software raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: disabled_software video_encode: disabled_software vulkan: disabled_off webgl: unavailable_software webgl2: unavailable_software webgpu: disabled_off |
| Load (avg) | 6, 4, 4 |
| Memory (System) | 31.20GB (26.26GB free) |
| Process Argv | --no-sandbox --force-user-env --crash-reporter-id 8288fe70-1d22-4ecb-a399-2ca5eb4778fd |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | ubuntu-xorg |
| XDG_CURRENT_DESKTOP | Unity |
| XDG_SESSION_DESKTOP | ubuntu-xorg |
| XDG_SESSION_TYPE | x11 |
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
tftest:31042121
vstes516:30244333
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
chatpanelc:31048052
dsvsc021:30996838
jg8ic977:31013176
pythoncenvpt:31049070
fchga941:31046352
dvdeprecation:31052039
pythonprc:31047982
dwnewjupytercf:31046870
26j00206:31048877
Reacted by Clemens Schicktanz
Metadata
Metadata
Assignees
Labels
triage-neededNeeds assignment to the proper sub-team
Activity
HappyCoder77 commentedon May 18, 2024
I have the same problem It almost make crazy.
s-kai273 commentedon May 18, 2024
although
deactivatecommand should work, I'm wondering what the proper behavior is...when opening a new terminal, python default path should be global one?
hnur-eris commentedon May 21, 2024
I had same issue. First of all you need to delete virtual environment (./venv directory) on your path, and then try deactivate command once again.
ilmari99 commentedon May 27, 2024
I don't know the underlying reason for the bug, but changing the permissions of the deactivate script worked for me:
chmod u+x /home/username/.vscode/extensions/ms-python.python-2024.6.0/python_files/deactivate/bash/deactivate.michelmetran commentedon May 27, 2024
I thank!
Here I was having the same problem and by changing the permissions I managed to solve it!
anthonykim1 commentedon May 29, 2024
In a remote scenario there is the permission issue: #23195
Jon Tyler (@k98kurz) Can you try with the enhanced permission referenced in #23195?
Another way would be opting out of terminal env activation by adding:
"python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"],in your settings.json
k98kurz commentedon May 30, 2024
I can confirm that the permissions solution works
Restore execute bits on deactivate scripts (#23620)
Restore execute bits on deactivate scripts (#23620)
Restore execute bits on deactivate scripts (microsoft#23620)