How to clear Visual Studio Code cache?

Viewed 624

I am in anaconda dependency hell so I keep building and then deleting different environments and the Visual Studio Code cache seems confused about what environments are available, for example looking for an environment that has been deleted.

I uninstalled and reinstalled VSC (Windows Server 2012 - waiting for upgrade) but the issue persists.

Thanks for any thoughts.

1 Answers

When using Python in VS Code, it recognizes the available python executable file "python.exe", which we can view in the system variables:

enter image description here

In VS Code, it uses the python environment used last time by default, therefore, for unused python environments, you could select other available python environments in VS Code and ignore the deleted python environments. (F1, Python: Select Interpreter)

For more information about the python environment in VS Code, please refer to this document: Using Python environments in VS Code.

Reference: How do I add Python to the Windows PATH?

Related