pythonpytorchcondawindows-11

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


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 error while import pytorch module. (The specified module could not be found.) but without success.

Any ideas how to fix it?

My environment:


Solution

  • 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())