pytroch2.4 提示到不到fbgemm.dll

#python/pytorch/问题记录

```

>>> import torch

Traceback (most recent call last):

File "", line 1, in

File "C:\Users\95416\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\__init__.py", line 148, in

raise err

OSError: [WinError 126] 找不到指定的模块。 Error loading "C:\Users\95416\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.

```

1. 下载[Release minor fix on version number · lucasg/Dependencies (GitHub: Let’s build from here)](Release minor fix on version number · lucasg/Dependencies)并且运行DependenciesGui.exe,打开fbgemm.dll,位于"C:\\Users\\95416\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\torch\\lib",软件会分析缺失了什么文件。

pytroch2.4 提示到不到fbgemm.dll_第1张图片

通常是libomp140.x86_64.dll这个文件。
2. 在下面的链接下载这个文件[libomp140.x86_64.dll : Free .DLL download. (dllme.com)](https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download)
3. 解压缩后把libomp140.x86_64.dll复制到fbgemm.dll所在相同文件夹即可,"C:\\Users\\95416\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\torch\\lib"。

你可能感兴趣的:(python,pytorch)