-2

(test_pytorch) C:\Users\kuntal chowdhury>python Python 3.8.3 (default, May 19 2020, 06:50:17) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information.

import torch Traceback (most recent call last): File "", line 1, in File "C:\Users\kuntal chowdhury\Anaconda3\envs\test_pytorch\lib\site-packages\torch__init__.py", line 81, in ctypes.CDLL(dll) File "C:\Users\kuntal chowdhury\Anaconda3\envs\test_pytorch\lib\ctypes__init__.py", line 373, in init self._handle = _dlopen(self._name, mode) FileNotFoundError: Could not find module 'C:\Users\kuntal chowdhury\Anaconda3\envs\test_pytorch\lib\site-packages\torch\lib\caffe2_nvrtc.dll' (or one of its dependencies). Try using the full path with constructor syntax.

1 Answers1

0

See this answer here

TL;DR, I suspect you are trying to run torch from an environment that does not have CUDA installed. Thus, you must install the cpu version of torch:

conda install pytorch torchvision cpuonly -c pytorch
JohnnyUtah
  • 350
  • 4
  • 11