报错详情
C:\Users\1>activate test
C:\Users\1>conda.bat activate test
(test) C:\Users\1>pip list
Package Version
----------------- ------------
filelock 3.13.1
fsspec 2024.2.0
Jinja2 3.1.3
joblib 1.4.2
MarkupSafe 2.1.5
mpmath 1.3.0
networkx 3.2.1
numpy 2.0.1
pandas 2.2.2
pillow 10.2.0
pip 24.0
python-dateutil 2.9.0.post0
pytz 2024.1
scikit-learn 1.5.1
scipy 1.14.0
setuptools 71.0.4
six 1.16.0
sympy 1.12
threadpoolctl 3.5.0
torch 2.4.0+cu124
torchaudio 2.4.0+cu124
torchvision 0.19.0+cu124
typing_extensions 4.9.0
tzdata 2024.1
wheel 0.43.0
(test) C:\Users\1>python
Python 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:27:10) [MSC v.1938 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\miniforge3\envs\test\Lib\site-packages\torch\__init__.py", line 148, in <module>
raise err
OSError: [WinError 126] 找不到指定的模块。 Error loading "D:\miniforge3\envs\test\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.
解决方案
详见pytorch|找不到 fbgemm.dll 问题处理-优快云博客以及pytorch 缺少 libomp140.x86_64.dll 下载-优快云博客