Lucy Myrol
Lucy Myrol

Reputation: 1

Error: ModuleNotFoundError: No module named 'torch' in spyder, works fine in jupyter notebook

I'm trying to learn python for a class. we're using jupyter notebooks where the import torch command works fine but using spyder I keep getting this error and I have no idea how to fix it. I'm a complete newbie at this and I really don't know what to do.

Upvotes: 0

Views: 7008

Answers (2)

JackHacks
JackHacks

Reputation: 263

Open Spyder terminal and try running conda install torch if using Anaconda, or pip install torch otherwise.

Upvotes: 0

Welcome_back
Welcome_back

Reputation: 1445

Let's try this

 conda install torch     # Use anaconda prompt

or

 pip install torch   # Use the command prompt

Upvotes: 1

Related Questions