Expose API for when the list of interpreters have changed
See original GitHub issueDiscussed in https://github.com/microsoft/vscode-python/discussions/16683
<div type='discussions-op-text'>Originally posted by DonJayamanne July 13, 2021 Currently there’s no way for Jupyter to know when user creates a new Python environment (conda, or the like).
Is it possible to get an event so we know that new interpreters have been created.
Note: Once thats done, how would we get these new interpreters. Not sure the GetInterrpeters
is the best API for this, as that will return all interpreters all over again. Personally it would be nice to have something we can subscribe to, like an observable, this way we only get whats new).</div>
Issue Analytics
- State:
- Created 2 years ago
- Reactions:16
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Interpreter and Environment Discovery - GitHub
This design exposes APIs via the IComponentAdapter interface. ... Returns true if the interpreter path is identified as python installed via Windows Store....
Read more >Embedding multiple Python sub-interpreters into a C program
Unfortunately, subinterpreters still share the GIL in 3.7 and 3.8. This is something I'm personally working on changing.
Read more >Project History — PyOxidizer 0.23.0 documentation
The minimum Rust version has been changed from 1.60 to 1.61 to facilitate use of ... API for controlling embedded Python interpreters has...
Read more >PEP 554 – Multiple Interpreters in the Stdlib
“interpreters” Module API. The module provides the following functions: list_all() -> [Interpreter] Return a list of all existing interpreters.
Read more >Making API Calls from Zeppelin Notebook
The default python interpreter version used by %pyspark is Python 2 and, to change that setting, you must change the spark's zeppelin.pyspark.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is now available via the proposed API for the python extension, please try this out and let us know.
Event for when the interpreter list changes: https://github.com/microsoft/vscode-python/blob/65c22e48b0007682552892393d2884c4af0b1a67/src/client/apiTypes.ts#L172
API to get currently know interpreters: https://github.com/microsoft/vscode-python/blob/65c22e48b0007682552892393d2884c4af0b1a67/src/client/apiTypes.ts#L145
API to get details for a given interpreter path: https://github.com/microsoft/vscode-python/blob/65c22e48b0007682552892393d2884c4af0b1a67/src/client/apiTypes.ts#L135
API to get the refresh promise, this will return a promise for the current ongoing discovery: https://github.com/microsoft/vscode-python/blob/65c22e48b0007682552892393d2884c4af0b1a67/src/client/apiTypes.ts#L167
API to trigger refresh of environments: https://github.com/microsoft/vscode-python/blob/65c22e48b0007682552892393d2884c4af0b1a67/src/client/apiTypes.ts#L162
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 5 👍 upvotes on the opening comment to gauge general interest in this idea. If there’s enough upvotes then we will consider this feature request in our future planning. If there’s unfortunately not enough upvotes then we will close this issue.