通过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),搞定。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章