Windows 10 can't import torch

installed latest python 3.5.4, didn’t work as below, so uninstalled and tried 3.5.1 with same result. Same thing happened on my laptop, both with windows 10.

pip3 install


import numpy
import matplotlib
import torch
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\agoodwin\AppData\Local\Programs\Python\Python35\lib\site-packages\”, line 78, in
from torch._C import *
ImportError: DLL load failed: The specified module could not be found.

1 Like

found a solution posted elsewhere.

@AlbertHuyb You are using pure Python, right? Then you’ll need to install the VC Redist 2017 by yourself. You’ll also need the intel-openmp dlls and Numpy.
Here are the links to them:
VC 2017 -
Intel openmp -

Download win-64/intel-openmp-2018.0.0-8.tar.bz2 and put the dll files in Library\bin into a dir and append the path of it to the environment variable PATH.

Just unack openmp to some directory, go to control panel - system - advanced - environment variables - select path - new - add a path to the bin folder of openmp

I had to install python 3.5.4 after a reboot, before it finally worked. So I had python 3.5.1, added the above, then rebooted, then upgraded to 3.5.4. This worked on both computers. Watch out for a pending windows update. Your Visual C++ redistribution install will just hang. Arg!

1 Like