通过pip安装pytorch,from torch._C import * ImportError: DLL load failed,解决方法

通过pip安装pytorch,出现from torch._C import * ImportError: DLL load failed: The specified module could not be found

有帖子说因为缺少dll(https://blog.csdn.net/taxuezcy/article/details/80741315),但试了不行,后来用必应搜了一下,是需要安装VC_redist.x64.exe(Visual C++ Redistributable for Visual Studio 2015) (https://github.com/pytorch/pytorch/issues/9263#issuecomment-404436747),搞定。

 

你可能感兴趣的:(通过pip安装pytorch,from torch._C import * ImportError: DLL load failed,解决方法)