[WinError 126] The specified module could not be found

Can someone help me?
I am trying to use torch in my project but it is not working.
To test the torch I have tried following simple code.
import torch
x = torch.rand(5, 3)
print(x)

and I have got following error. “shm.dll” is in the right directory and the directory is included in the system path.

Error:
OSError: [WinError 126] The specified module could not be found. Error loading “C:\Users\BERAY\AppData\Local.…\site-packages\torch\lib\shm.dll” or one of its dependencies.

Seem to be related to this issue. You could check the corresponding GitHub issue suggesting workarounds or you could update to the latest nightly release where the issue was already fixed.

It is working now. :slight_smile:
Thank you

help what did you do teach me mine is not working

1 Like