[WinError 126] when importing pytorch on pc with Nvidia gpu

Even though vscode shows that torch library is installed, when I try to run my code this error occurs:

File “c:\Users.…\Desktop\I3D_WLASL\train_i3d.py”, line 4, in
import torch
File “C:\Users.…\Anaconda3\lib\site-packages\torch_init_.py”, line 139, in
raise err
OSError: [WinError 126] The specified module could not be found. Error loading “C:\Users.…\Anaconda3\lib\site-packages\torch\lib\caffe2_nvrtc.dll” or one of its dependencies.

What should I do? (I am using latest versions of all packages.)

Based on this topic it seems reinstalling PyTorch with the --user argument might solve the issue, but note that I am not deeply familiar with Windows setups and thus cannot confirm if this approach worked or why the error is raised in the first place.