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

 

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