I deleted some of the virtual environments (r-keras, r-tensorflow) a while ago. However, they still show up in the python environments in VS Code. How can I clear the cache for this and make sure they are not shown anymore?
I assume that you've already refreshed your environments before. So, you can try to clear the cache manually by first closing VS Code, then navigating to the folder :
Windows:
C:\Users\<YourUsername>\AppData\Roaming\Code\User\globalStorage\ms-python.python
macOS/Linux:
~/.config/Code/User/globalStorage/ms-python.python
After navigating to the folder, find and delete files like environments.json
and interpreterInfo.json
inside the folder.
After that, restart VS Code. The deleted environments should no longer appear when you select a Python interpreter again.