[WinError 1114] loading c10.dll issue occurred while running import torch

HI,There
i guess this github issue should be relevant

this comment might be helpfull
(temporary solution)try adding these lines before importing pytorch see if it works
import os
import platform
if platform.system() == “Windows”:
import ctypes
from importlib.util import find_spec
try:
if (spec := find_spec(“torch”)) and spec.origin and os.path.exists(
dll_path := os.path.join(os.path.dirname(spec.origin), “lib”, “c10.dll”)
):
ctypes.CDLL(os.path.normpath(dll_path))
except Exception: