I have encountered a problem when running script in vscode. Previously, when I click rum bottom on the right top, it shows:
& D:/Software/Anaconda3/envs/pytorch-gpu/python.exe "d:/Research/hyperspectral classification/classification/aa.py"
in the terminal and runs correctly. But recently, when I run the script, it shows:
& conda run -n pytorch-gpu --no-capture-output --live-stream python "d:/Research/hyperspectral classification/classification/aa.py"
and the terminal doesn't show the results.
How can I change to previous command when I click run bottom?
CodePudding user response:
A colleague of mine encountered the same problem today. We managed to solve it by downgrading the python extension in vscode.
- ctrl-shift-x to open extensions in vscode.
- Select Python extension
- Click dropdown menu next to Uninstall and Install Another Version
- We selected the last version of 2021.
CodePudding user response:
The anaconda you later installed caused the Python interpreter vscode was looking for to be inconsistent.
You can type ctrl shift P and type "select Interpreter" and then choose the appropriate interpreter.