Pytorch DLL Loaderror in windows 10

Hi guys,
I am faced this problem when I updated my pytorch version to 0.4.0. When I try to import torch then this error pops up.
File “”, line 1, in
File “C:\Users\aashi\Anaconda3\envs\fastai\lib\site-packages\torch_init_.py”, line 78, in
from torch._C import *
ImportError: DLL load failed: The operating system cannot run %1.

This issue arises only when I uses fastai environment to run python. When I use base environment then it imports successfully.
Please help me with this.
thanks

3 Likes

I fixed it by running the following command: conda install -c defaults intel-openmp -f
Reasoning described here: https://github.com/pytorch/pytorch/issues/7579