-
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
venv does not activate on my manjaro system for zsh #22899
Comments
@matt-hires Based on your last comment #22881 (comment), do you mean to say that venv activation works for WSL + windows but not for your current system? If so, can you please provide screenshots on how you're determining whether the environment has activated? |
That's correct. It's working on my Windows machine with wsl, but not on my manjaro linux system. I checked if the venv was sourced with: which pip Which should show me the path to the pip in the venv directory, right? |
Actually that's not always true. Try using |
Thanks, can you also provide the following #22900 (comment)? And lastly, the debug logs again please, make sure to use latest pre-release, thank you. |
✅ Run 'Python: Clear cache and reload window' command A screenshot when you hover over zsh: Whether shell integration is actually working: And lastly, the debug logs again please: |
Thanks a lot for this, at this point we need some help from VS Code to reliably predict whether shell integration is working or not: microsoft/vscode#205058. It seems that even though the environment is set for your case:
It's not reflected in the terminal. If you click "Show environment contributions" in the previous screenshot, it seems like the |
I'm working on a temporary fix to remedy this: #22905, but it seems a long term solution has to come from VS Code at this point . |
I guessed it might be something like this, due to the fact that the shell prompt correctly shows the venv python version. And also thank you for your investigation into this. |
Of course. If you don't mind could you test out https://github.com/microsoft/vscode-python/actions/runs/7882029722/artifacts/1240529254 and see if it helps? You can use |
Actually, that wouldn't help in your case. Never mind. |
Can you provide a screenshot of all variables that're supposed to be set in "Show environment contributions", and then check which those are set in terminal? For eg. You can run "echo $PATH" to see whether it's set. |
Please use the latest pre-release before providing this info. |
My system: Version: 1.86.1 I just updated the Python extension to v2024.1.10441005 (pre-release). My log: venv is not being activated in my zsh terminal. If I use bash, then it works fine. |
@norambna Can you run "echo $PATH" in your |
I think you all might be running into: microsoft/vscode#205102. |
My contributed environment
My
|
Can you also report the same when trying out the latest release version of the extension? Appreciate all the help! @matt-hires |
Btw, can you share your |
I'm using the Python extension v2024.1.10441814 (pre-release) now and
And the PATH I'm getting in a bash terminal, where my venv is being activated automatically is:
|
here you go: this includes |
Thanks. Can any of you provide the value of Btw, both your issues seem to be microsoft/vscode#205133. The above information would help confirm it. |
When using Release Version Contributed Env:
Path Variable:
And the Path after sourcing venv manually
|
PATH in a zsh terminal when using Python Extension v2024.1.10451007 (pre-release): And PATH when using Python extension v2024.0.1: |
Ok great, thanks for confirming. It seems automatic shell integration for zsh shell isn't working for you, same as microsoft/vscode#205133. I encourage you to upvote that to raise awareness and priority. As a workaround, try manual installation, which I expect should fix your issues: https://code.visualstudio.com/docs/terminal/shell-integration#_manual-installation. |
Yes, the "Manual installation" solved it on my system! Thanks and I also upvoted microsoft/vscode#205133 |
Workaround was also working for me, thx for your effort @karrtikr. |
Systeminfo
In my last #22881 (comment), I've tested it successfully on windows+wsl with zsh.
Her are the logs of my manjaro system with the last fix from #22881 (comment):
Python.log
Originally posted by @matt-hires in #22881 (comment)
The text was updated successfully, but these errors were encountered: