OSError: [WinError 127] The specified procedure could not be found
OSError: [WinError 127] The specified procedure could not be found
在导入 torch (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.
我尝试了 的建议,但没有成功。
有什么解决办法吗?
我的环境:
- 英伟达 GeForce GTX 1650
- Windows11
- Cuda 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)
幸运的是,经过大量研究,我找到了解决方案。
有人建议我创建一个新的 conda 环境。这对我有用!
解法:
- 通过以下方式创建新的 conda 环境:
conda create --name new-env
- 安装python:
conda install python=3.8.5
- 运行:
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
- 测试库达:
import torch; print(torch.version.cuda); print(torch.cuda.is_available())
在导入 torch (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.
我尝试了
有什么解决办法吗?
我的环境:
- 英伟达 GeForce GTX 1650
- Windows11
- Cuda 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)
幸运的是,经过大量研究,我找到了解决方案。 有人建议我创建一个新的 conda 环境。这对我有用!
解法:
- 通过以下方式创建新的 conda 环境:
conda create --name new-env
- 安装python:
conda install python=3.8.5
- 运行:
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
- 测试库达:
import torch; print(torch.version.cuda); print(torch.cuda.is_available())