Closed
Description
Environment data
- VS Code version: 1.41.1
- Extension version: 2020.1.57204
- OS and version: Windows_NT x64 10.0.19041
- Python version (& distribution if applicable, e.g. Anaconda): 3.7 Anaconda
- Type of virtual environment used: conda
Expected behaviour
VS code should start up fast and detect conda environments on the machine.
Actual behaviour
Some python processes uses 100 % CPU and hangs when VS code starts.
The hanging processes are using conda run
to query conda environments info using ms-python.python-2020.1.57204\pythonFiles\interpreterInfo.py
.
This process hangs if the conda-environments are in locations which require admin rights.
The problem is caused by a bug conda-run conda/conda#9574 which creates temporary files directly in the environments instead of the tempfile folders. This again triggers a long standing Python bug in the tempfile module.
Steps to reproduce:
- Create an environment
- Move a environment to a place requiring admin rights E.g. "c:/conda-env"
- Start VS code and wait for Python extension to query the environment with
conda run