OSError: [WinError 127] 找不到指定的过程

2023-12-22

导入火炬时(import torch)我面临以下错误消息:OSError: [WinError 127] The specified procedure could not be found. Error loading "C:\Users\myUserName\anaconda3\lib\site-packages\torch\lib\jitbackend_test.dll" or one of its dependencies.

我尝试了来自的建议本文 https://stackoverflow.com/questions/63187161/error-while-import-pytorch-module-the-specified-module-could-not-be-found但没有成功。

有什么想法如何修复它吗?

我的环境:

  • NVIDIA GeForce GTX 1650
  • 视窗11
  • 库达11.5
  • 康达4.10.3
  • Python 3.8.5
  • 火炬1.10
  • 安装了 Microsoft Visual C++ Redistributable (https://aka.ms/vs/17/release/vc_redist.x64.exe https://aka.ms/vs/17/release/vc_redist.x64.exe)

幸运的是,经过广泛研究,我找到了解决方案。 有人建议我创建一个新的 conda 环境。这对我有用!

解决方案:

  1. 通过以下方式创建新的 conda 环境:conda create --name new-env
  2. 安装Python:conda install python=3.8.5
  3. run: conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
  4. 测试cuda:import torch; print(torch.version.cuda); print(torch.cuda.is_available())
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

OSError: [WinError 127] 找不到指定的过程 的相关文章

随机推荐