Reputation: 33948
I am trying to set up Python Environment on VS Code 1.22.2 (Windows 10, v.1803) with the Python extension 2018.4.0. My problem is, that whatever I do, I can not get rid of the error in the Status Bar:
I have these in my User Settings:
"python.venvPath": "C:/Python/VirtualEnv",
"python.pythonPath": "C:/Python/VirtualEnv/myproject/Scripts/python.exe",
and I have tried both the forward slashes '/
' and double backslashes '\\
' as folder name separator.
When I Click the "Select Python Environment", I can see a list of virtual environments (from C:/Python/VirtualEnv
). However, even if I select one, the status bar still says "Select Python Environment". Every time I try to select an virtual environment, the Terminal (Output -> Python) says
Linter 'pylint' is not installed. Please install it or select another linter".
Error: spawn c:\PATH_TO_WORKSPACE\src/venv/bin/python ENOENT
It clearly tries to start a python process from a wrong folder. How should I try to fix this?
Edit: Tried also disabling all the other extensions and restarting, with no luck.
Upvotes: 2
Views: 764
Reputation: 33948
So it turned out that for some reason I had to delete and recreate the VS Code workspace, and after that the selection worked again. I'm leaving this here to perhaps save someone else's time in the future.
Upvotes: 1