-
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
Deactivate Script in remote server is Permission denied #23195
Comments
Experiencing the same issue as well. This was after the new update. Am running on WSL2 Ubuntu 20.04 |
For work around -> With root access you can give rights to deactivate file with chmod. |
Same problem here, which also persists when rolling back to the previous version of VSCode (1.87.2). Cannot use the workaround that was suggested as I don't have sudo rights on the remote server. |
Update: After also deleting .vscode-server on the remote to force a reinstall of VS Code Server, it now seems to work again with version 1.87.2. So it probably is the last update causing the issue. |
+1 Pop!_OS 22.04 LTS Found this comment recommending to downgrade the Python Extension from |
This worked for me on VSCode Insiders v1.89.0-insider |
Hello everyone the double parenthesis is fixed and tracked via: #23193. I'll look more into deactivate with remote scenarios. |
I'm running into the same issue on my MAC. Here are the specific details of my VSCode setup:
Update: Following @ykursav's answer, I ran a slightly modified command sudo chmod 777 /root/.vscode-server/extensions/ms-python.python-2024.4.0/python_files/deactivate/bash/deactivate
deactivate and now everything works! |
+1 |
On local venvs deactivate also doesnt work and gives Fix is the same: I am on mac M1pro with zsh. |
+1 |
1 similar comment
+1 |
✅ |
This worked for me on WSL2 Ubuntu. Thanks |
the issue is that the deactivate script is created with the wrong permission in the ~/.vscode/extensions/ms-python.python-2024.4.1/python_files/deactivate/bash/deactivate |
+1 |
Deactivation with the current terminal environment variable activation experiment has some limitation as previously mentioned in: #22037. We then have made effort to inserting deactivate script path from Python extension to user to work around this, but I can see the permission issue for remote scenarios. This is bit tricky since we cannot really automatically run deactivation with user admin permission without admin password, which should be private and is not ideal for extension to attempt. I'll be looking around to see if there are alternative ways we can go about injecting deactivation path for remote scenarios. For now see, lets see if following https://github.com/microsoft/vscode-python/wiki/Fixing-%22deactivate%22-command-for-Virtual-Environments and inserting the path to deactivate script yourself(user) in shell specific initialization script works. |
Why is this script even here? I have this in my .bashrc now:
|
What if I am running VSCode on Windows and want to connect (SSH) to Linux - what is the command to fix in this case? |
https://github.com/microsoft/vscode-python/blob/main/python_files/deactivate/bash/deactivate does not currently have any executable bits set. It looks like it used to but #22921 removed them. I've proposed #23620 to restore them. I've noticed that pyenv-virtualenv requires If there's a reason to prefer it, I think it'd be acceptable for vscode-python to also require the |
#22921 removed executable bits: ```diff diff --git a/pythonFiles/deactivate/bash/deactivate b/python_files/deactivate/bash/deactivate old mode 100755 new mode 100644 similarity index 100% rename from pythonFiles/deactivate/bash/deactivate rename to python_files/deactivate/bash/deactivate ``` https://github.com/microsoft/vscode-python/pull/22921/files#diff-796809259ce3b33f54a33371e898048faf2f7f912cd1bbe11059feb40a63a58d Set them back. Fixes #23449 and #23195
|
@jamesylgan Try the pre-release it should have the fix |
#22921 removed executable bits: ```diff diff --git a/pythonFiles/deactivate/bash/deactivate b/python_files/deactivate/bash/deactivate old mode 100755 new mode 100644 similarity index 100% rename from pythonFiles/deactivate/bash/deactivate rename to python_files/deactivate/bash/deactivate ``` https://github.com/microsoft/vscode-python/pull/22921/files#diff-796809259ce3b33f54a33371e898048faf2f7f912cd1bbe11059feb40a63a58d Set them back. Fixes #23449 and #23195
microsoft#22921 removed executable bits: ```diff diff --git a/pythonFiles/deactivate/bash/deactivate b/python_files/deactivate/bash/deactivate old mode 100755 new mode 100644 similarity index 100% rename from pythonFiles/deactivate/bash/deactivate rename to python_files/deactivate/bash/deactivate ``` https://github.com/microsoft/vscode-python/pull/22921/files#diff-796809259ce3b33f54a33371e898048faf2f7f912cd1bbe11059feb40a63a58d Set them back. Fixes microsoft#23449 and microsoft#23195
Type: Bug
When creating a virtual environment with python3 -m venv env and then opening the terminal
((env) ) randark@developer:~/code/20240407-ssti$
Anomalous double-bracket-wrapped environment hints appear
At the same time, when trying to de-activate the virtual environment, an anomalous insufficient permissions message appears
Extension version: 2024.4.0
VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:20:17.278Z)
OS version: Windows_NT x64 10.0.22631
Modes: Unsupported
Remote OS version: Linux x64 6.5.0-17-generic
System Info
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
A/B Experiments
The text was updated successfully, but these errors were encountered: