在导入import torch时,出现下面这种情况:

根本原因是由于numpy版本过低,解决方案如下:先卸载低版本的numpy,再安装新版本的numpy,即

pip uninstall numpy

pip install -U numpy

 大功告成,如下所示:

Logo

更多推荐