-
Notifications
You must be signed in to change notification settings - Fork 1.2k
virtualenv created in hidden directory (.venv/) is not automatically detected #18435
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
Comments
Also tried activating the venv after creation:
Still no popup. |
Also please set LogsOutput for
|
Thanks @karrtikr for looking at this. Yes from I used this issue template which didn't ask for logs but here they are: logs
|
FYI if in the terminal I create a virtualenv in
It is automatically detected and the popup shows. It would appear from the logs the watcher isn't looking for hidden directories:
I believe it used to do so. |
Thanks for the info, please also help with the the following questions:
we expect it to detect.
|
Yep the interpreter is /private/tmp/foobar2/.venv/bin/python and bash will treat a file or dir starting with I dumped the logs from startup to the creation of the virtualenv in the terminal. But not the selection of the new virtualenv's interpreter. |
I've installed zsh terminal on wsl2 ubuntu and everything with .env is not working + problem above. |
Can you also include that? Meanwhile I'll attempt to reproduce this behavior. |
This is what I see when doing Python: Select Interpreter -> .venv
|
Can you paste the full output please, which involves all the step including creating a venv. Make sure you have verbose logging turned on as suggested above. |
@karrtikr
logs
|
Apologies for the delayed response, unfortunately I'm unable to reproduce this issue, note we ignore directories in |
We also have some of our watcher test failing in Linux: #18150, perhaps your issue should be fixed once that's investigated. |
Please try using https://github.com/microsoft/vscode-python/suites/6166801806/artifacts/216130550 and see if it helps, use |
@karrtikr ah good catch, that was it! I have
If I remove that, the virtualenv is found. The reason I added the exclude was when I connect to a remote Linux instance I was getting errors about indexing taking too long. I guess what would be ideal is detection of Is it still worth me trying the new insiders version? |
Good to know, and nope that should no longer be needed. Closing this.
I assume you're talking about intelliSense, in that case please check with https://github.com/microsoft/pylance-release to see if they can provide any other setting.
Users might create folders without any binaries, so unfortunately just watching the folder won't work for us. We've to watch for the python binary instead. |
when a new virtualenv is created in the terminal, vscode will now popup a prompt to select it as the python interpreter for more details see [virtualenv created in hidden directory (.venv/) is not automatically detected #18435](microsoft/vscode-python#18435)
Issue Type: Bug
Behaviour
Expected vs. Actual
When a new virtualenv was created in the terminal, vscode used to popup a prompt to select it as the python interpreter
Steps to reproduce:
python -m venv .venv
No popup.
Diagnostic data
python.languageServer
setting: PylanceUser Settings
Extension version: 2022.0.1786462952
VS Code version: Code 1.64.0 (5554b12acf27056905806867f251c859323ff7e9, 2022-02-03T04:20:17.224Z)
OS version: Darwin x64 21.3.0
Restricted Mode: No
System Info
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: