Cannot import Pytorch [WinError 126] The specified module could not be found

前端 未结 5 2248
离开以前
离开以前 2021-02-18 15:31

I\'m trying to do a basic install and import of Pytorch/Torchvision on Windows 10. I installed a Anaconda and created a new virtual environment named photo. I opened Anaconda pr

5条回答
  •  春和景丽
    2021-02-18 16:05

    Encountered the same issue. I used the fix suggested in by the link below: (Fix 2 worked for me)

    https://discuss.pytorch.org/t/winerror-126-when-import-torch/80249/8

    Fixes:

    1.Update to Python 3.8 from 3.7

    2.Apply https://github.com/pytorch/pytorch/pull/37763 manually.

    Replace your local copy with https://gist.github.com/peterjc123/bcbf4418ff63d88e11313d308cf1b427 (e.g. C:\ProgramData\Anaconda3\Lib\site-packages\torch)

提交回复
热议问题