Home > OS >  How to resolve the problem that vscode no output when click run bottom?
How to resolve the problem that vscode no output when click run bottom?

Time:03-08

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.

  1. ctrl-shift-x to open extensions in vscode.
  2. Select Python extension
  3. Click dropdown menu next to Uninstall and Install Another Version
  4. We selected the last version of 2021.

screenshot

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.

  • Related