-
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
Fix support for folders in python.pythonPath setting #15782
Comments
On MacOS downgrading from 1.54.3 to 1.54.2 did not work for me. When I select the interpreter path through vscode to be in my venv path pythonPath is instead changed to an Xcode path. This is very unexpected to me. Edit: if you have this issue simply performing a restart seemed to clear this issue after the downgrade. I still have the unexpected behavior however. |
From #15781 it seems the detection of interpreter happen in a different shell and not using my venv. Workaround: |
Thanks for the bug report! We just wanted to quickly acknowledge we received it and we will triage this as soon as we can. |
@meakbiyik The bug was introduced with #15726, but we plan to move away from supporting interpreter paths that way now,
You can try to workaround this using #12313 (comment). |
@karrtikr thanks a lot! Just to note my use case: I use poetry in all my projects with with the poetry.toml:
looking like this, and |
Yes.. thanks for bringing this up and we're well aware of this. This has been thoroughly discussed with #12313, but unfortunately for now the decision is made. You can follow the thread for updates we make. We try our best to keep everyone happy but sometimes it's not possible. I think the workaround mentioned in #12313 (comment) should work for your case. |
That's unfortunately not the case, as the assumption of not having any settings is just extreme. I take it that there won't be any solutions to this. Eh, we'll pass that bridge then, if we can. Thanks anyways 👍 |
Actually the assumption is to not have any |
Oh that makes much more sense. Thanks, I will try that out! |
@karrtikr I think the folder support is still broken. I installed from https://github.com/microsoft/vscode-python/wiki/Contributing. Don't know if it contains your commits. OS: Win. Python 3.9.2 from MS Store. |
The fix has not been released yet. You can use the Insiders build of the extension by using |
@imba-tjd Due to bug introduced with #15776 (comment), development build is no longer up to date, hence it doesn't have the fix yet. We'll fix this first thing next week, thanks for bringing this to our attention. |
I just installed the build from GitHub Actions artifacts and I can confirm Though it still can't detect venv. If I don't set I don't have the issue now. v2021.4.765268190 |
Interesting, can you please open up a separate issue for this? Also please upload the logs as mentioned in the isse template. |
FYI Insiders build should now have the fix. |
Environment data
python.languageServer
setting: PylanceExpected behaviour
For
"python.pythonPath": "${workspaceFolder}/.venv"
workspace setting, extension is expected to find the virtualenv in the given directory.Actual behaviour
The extension is unable to find the virtual env with the latest update (rolling back to the previous version works fine).
Steps to reproduce:
IMPORTANT NOTE:
".venv\\Scripts\\python.exe"
works fine, but"${workspaceFolder}\\.venv"
,"${workspaceFolder}/.venv"
does not. All of them works in the previous version.Possibly related to #15781 but I do not have the error described in that issue in the output below.
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)The text was updated successfully, but these errors were encountered: