Failed to import pytorch fbgemm.dll or one of its dependencies is missing

Thank you so much. I was struggling with this issue for quite long and this really helped. You are a savior.

1 Like

sloved by pasting libomp140.x86_64.dll in same folder as fbgemm.dll

3 Likes

Exactly!!! It can be found at https://www.dllme.com/dll/files/libomp140_x86_64.

Think you.The problem was solved.

1 Like

i love you dude you are my hero

omg thank you,you save my life

1 Like

Just made an account to say this worked for me as well

brooooooooooooooooooooooooooooooooooooooooooooooooooo!Love u!

Worked 4 days for this problem and only this FINALLY saved me :joy: THANK U VERY MUCH!!!

I have the same problem, sorry but how to download the libomp140? I can‘t find the file.

1 Like

I fixed the issue by this method though I suffered from the installation for a while.

Brief conclusion:
I ran the “Visual Studio Installer” from windows menu and checked “Desktop Development with C++” workload, then let the program install things for me and fixed the issue.

More details:
The point is, these dll dependencies come from Visual C++ Redistributable and the installation might not be work if you had installed visual studio before. We have to make sure the C++ Redistributable to be installed.

I’d installed visual studio community 2022 in my computer, but I didn’t check the “Desktop Development with C++” workload when I was installing it as I literally use C# and Python to do everything. And the executable file downloaded from this post did nothing but repair the workloads/components that had already installed.

I had to manually run the visual studio installer from the windows menu and select the “modify” button then I can add the C++ workload to my visual studio community.

The dll dependency issue is gone once the C++ workload is installed, hope this works for you guys

1 Like

The easiest thing to do guys is to download the 2.3.0 version of pytorch

thanks, my problem solved by this method. :slightly_smiling_face:

It is useful for me.Thank you

Thank you. This helps a lot. Been struggling for few days.

Thanks, really useful!

File can be found in link from here:

Actual link:

2 Likes

That answer didn’t help me. I have a PC with an AMD Radeon and I get the same error OSError: [WinError 126] The specified module could not be found. Error loading “.venv\Lib\site-packages\torch\lib\fbgemm.dll” or one of its dependencies. How can I fix this?

vlw mano! A judou muito

I am not sure if it is a false positive, but be careful with the solution because of viruses VirusTotal - File - 893d4bfdb94247c88e563d765f6d547fafc8e93f7ecf9f1d17b5dbc0ebd40261.