I have cleanly and successfully installed PyTorch and associated packages within my virtual environment (BotVirtualEnv). It passed all required tests, including that of Python Interpreter and ensured it’s selected within VSCode. In my neural_net.py script I created the following import statements (import torch, import torch.nn as nn, import torch.optim as optim) with which to work. The code itself is clean with no syntactic errors yet the interpreter, I suppose, keeps throwing the below error:
Traceback (most recent call last):
File “/Users/sBliss_/Trading-Algorithm/src/neural_net.py”, line 1, in
import torch
ModuleNotFoundError: No module named ‘torch’
I am here only because I have exhausted every troubleshooting knowledge that I ever had. I even created an environment variable and pointed the interpreter as well, and all to NO avail. Someone please help.
Sorry, I cannot enumerate them. I mean, so many that I both physically and mentally exhausted. Just can’t remember them.
user1442290 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.