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

前端 未结 5 2249
离开以前
离开以前 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:11

    Refer to below link: https://discuss.pytorch.org/t/cannot-import-torch-on-jupyter-notebook/79334

    This is most probably because you are using a CUDA variant of PyTorch on a system that doesn’t have GPU driver installed. That is to say, if you don’t have a Nvidia GPU card, please install the cpu-only package according to the commands on https://pytorch.org.

    Conda

    conda install pytorch torchvision cpuonly -c pytorch

    Pip

    pip install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

提交回复
热议问题