No model named torch
Dear fellow humans and others,
i have a question about using and importing pytorch into my editor.
I installed pytorch through Conda and in my terminal editor I can use pytorch,see image but not in Visual studio code or Pycharm!
No model named torch error code in VSC
Why is that?
Very sorry for the basic question and thank you for sparing some time!
Should I use pip?

Reason: The environment where the module &quot;torch&quot; is stored is not the environment you currently select in VSCode.
For installing and using the module &quot;torch&quot; in VSCode, you could refer to the following:

Check the environment. The Python environment displayed in the lower left corner of VSCode is the same as that of the terminal.


Install the module. (pip install torch)

Run.


Check the installation of the module. (pip show torch)



Reference: Environment in VSCode.
