0

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?

3 Answers 3

2

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

Sign up to request clarification or add additional context in comments.

Comments

0

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.

1 Comment

Thank you for your help. I have change my interpreter, it seems not this reason. This is caused by the python extension version, and the upper answer can solve this problem. Thank you.
0

It's quite an easy solution; i once tried it on my c++ code as a beginner; I hope it helps. Close vscode, go to properties>compatibitlity, and disable the win eight checkbox; then reopen and run!

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.