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

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