I have been stuck on this issue for several days, so any help is greatly appreciated.
I recently had to move away from Anaconda (due to their change in the commercial policy) and decided to try Miniforge. It comes with Python 3.9, but since in most projects I need 3.7, I created a new venv with conda create --name StandardPython python=3.7.6
.
Each time I open a python script I get the error message "Python is not installed":
even though it of course is, and I can even manually select the interpreter:
Moreover, the virtualenv I have created is not found in the list given by VScode:
I can select it manually with "Enter the interpeter path", but besides that being a long process to do each time I want to switch envs, it also does not fix the problem as at the next restart VScode still does not show the venv in the list, even though it is indicated as "current":
It's worth mentioning that I am not using workspaces at the moment, I am just opening the python file(s) directly. This worked perfectly with Anaconda and I could select all the venvs I created without problems from the list, so switching was a breeze. Somehow now it does not work anymore.
I have already tried:
- Removing (
conda env remove --name StandardPython
) and recreating the environment - Setting the
python:pythonpath
in VScode to the base python....\AppData\Local\miniforge3\python.exe
- Setting the
python:condapath
to Miniforge's path....\AppData\Local\miniforge3\Scripts\conda.exe
- Uninstalling and reinstalling the Python plugin for VScode
- Uninstalling and reinstalling VScode (also manually cleaning up all configs and plugin files
- Uninstalling and reinstalling Miniforge