OSError: [WinError 127] The specified procedure could not be found
Asked Answered
F

2

5

While importing torch (import torch) I'm facing the following error message: 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.

I tried the suggestion from this article but without success.

Any ideas how to fix it?

My environment:

Flatcar answered 13/11, 2021 at 21:47 Comment(1)
I very, very, very much doubt that CUDA 11.5 will be the right version for whatever build of Pytorch you have, but that might not be your only problemNehemiah
F
5

Fortunately, after extensive research, I found a solution. Someone suggested me to create a new conda environment. And that worked for me!

Solution:

  1. create new conda env by: conda create --name new-env
  2. install python: conda install python=3.8.5
  3. run: conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
  4. test cuda: import torch; print(torch.version.cuda); print(torch.cuda.is_available())
Flatcar answered 23/11, 2021 at 23:16 Comment(0)
C
3

reinstalling problematic library (torchaudio) + closing and reopening terminal fixed the issue for me ( on windows )

python -m pip install --upgrade torchaudio

Cultural answered 3/6, 2023 at 16:18 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.