OSError: [WinError 126] 找不到指定的模块 backend_with_compiler.dll

​Conda 环境中运行 Python 环境,当执行 import torch 时,发生如下错误如下:

>>> import torch
Traceback (most recent call last):
  File “<stdin>”, line 1, in <module>
  File “C:\Users\tzhuw\.conda\envs\test\lib\site-packages\torch\__init__.py”, line 139, in <module>
    raise err
OSError: [WinError 126] 找不到指定的模块。 Error loading “C:\Users\tzhuw\.conda\envs\test\lib\site-packages\torch\lib\backend_with_compiler.dll” or one of its dependencies.

可以尝试安装如下包:

conda install pkg-config libuv

完成上述包安装后,再次执行命令,则发现错误已解决。

Good Luck!

参考链接:https://github.com/intel/intel-extension-for-pytorch/issues/429

此条目发表在人工智能分类目录,贴了, , , , , 标签。将固定链接加入收藏夹。

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注