Currently the display names of interpreters are cached for a period of 1day.
This is done to avoid unnecessarily spawning Python processes for each interpreter every time the extension loads (i.e. every time a new workspace is opened or VSC is reloaded).
Note: The cache also expires if the python executable file has changed since the last reload.
However, this can cause some confusions:
- Assume user has python 3.6 installed in a directory named
/anaconda3/bin
- Next user updates the above environment to python 3.7.
- Our code does not detect any changes to the above executable and the path is still the same.
- Hence the cached display name is still used (and its incorrect, user sees
3.6 when its supposed to be 3.7).
*** This confuses the user**
Solutions:
- Remove caching of these display names completely
- We'll end up spawning processes unnecessarily every time VSC loads
- Add some kind of the UI element to the top of the list of interpreters
- This would read
Don't find what you're looking for, click Refresh [Refresh]
- Basically this is a way to tell the extension to re-load all interpreters and clear the cache
- This also solves the problem of the user NOT having to reload VS Code if they create a new environment (e.g. a new Conda Environment or the like).
Currently the display names of interpreters are cached for a period of 1day.
This is done to avoid unnecessarily spawning Python processes for each interpreter every time the extension loads (i.e. every time a new workspace is opened or VSC is reloaded).
Note: The cache also expires if the python executable file has changed since the last reload.
However, this can cause some confusions:
/anaconda3/bin3.6when its supposed to be3.7).*** This confuses the user**
Solutions:
Don't find what you're looking for, click Refresh [Refresh]