OSError: [WinError 126] The specified module could not be found. Error loading "C:\apps\python\lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.
System information:
Operating system: Windows 11 Python version: 3.15 PyTorch version: 2.3.0 I'm not sure what else to try to resolve this issue. Any help or suggestions would be greatly appreciated. Thank you!
I've tried reinstalling PyTorch using pip uninstall and pip install commands, but the issue persists. I've checked my system environment variables and ensured that the paths to Python
I was able to resolve this issue and it was related to a missing dependency for:
libomp140.x86_64.dll
I was setting up a clean Windows 11 Pro system and wanted to get the latest and greatest Torch with Cuda 12.4 on there for development. Until I got exactly the error you are mentioning. I tried installing and reinstalling different versions of the C++ redistributables to no avail. I also installed Visual Studio Pro 2022. Nothing would get me that file.
Remedy: Get a copy of libomp140.x86_64.dll and put it in C:\Windows\Sytem32
After I did that, everything started working. For some reason, installing the newest VS and/or C++ redistributables will no longer put that file in there. I got mine from a (slightly) older install that had Visual Studio Pro on it. So, you may need to get it yourself until there is some kind of official fix. Disclaimer: I have no idea if this fix is safe or causes conflicts. Please note those here if you have issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With