# \[WinError 126\] The specified module could not be found

**URL:** <https://discuss.pytorch.org/t/winerror-126-the-specified-module-could-not-be-found/202601>\
**Category:** PyTorch Live\
**Created:** [May 12, 2024, 2:44pm UTC](https://discuss.pytorch.org/t/winerror-126-the-specified-module-could-not-be-found/202601 "2024-05-12T14:44:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuciin](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/yuciin/32/64210_2.png) [@yuciin](https://discuss.pytorch.org/u/yuciin)\
**Post date:** [May 12, 2024, 2:44pm UTC](https://discuss.pytorch.org/t/winerror-126-the-specified-module-could-not-be-found/202601/1 "2024-05-12T14:44:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [May 12, 2024, 4:25pm UTC](https://discuss.pytorch.org/t/winerror-126-the-specified-module-could-not-be-found/202601/2 "2024-05-12T16:25:23Z")

</div>

Seem to be related to [this issue](https://discuss.pytorch.org/t/error-loading-lib-site-packages-torch-lib-shm-dll-or-one-of-its-dependencie/201695/9). You could check the corresponding GitHub issue suggesting workarounds or you could update to the latest nightly release where the issue was already fixed.

---

<div class="post-metadata">

**Author:** ![yuciin](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/yuciin/32/64210_2.png) [@yuciin](https://discuss.pytorch.org/u/yuciin)\
**Post date:** [May 12, 2024, 5:01pm UTC](https://discuss.pytorch.org/t/winerror-126-the-specified-module-could-not-be-found/202601/3 "2024-05-12T17:01:52Z")

</div>

It is working now. 🙂  
Thank you

---

<div class="post-metadata">

**Author:** ![chenming7777](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/chenming7777/32/70204_2.png) [@chenming7777](https://discuss.pytorch.org/u/chenming7777)\
**Post date:** [May 22, 2024, 4:31pm UTC](https://discuss.pytorch.org/t/winerror-126-the-specified-module-could-not-be-found/202601/4 "2024-05-22T16:31:28Z")

</div>

help what did you do teach me mine is not working
