我在没有GPU支持的Windows pc上使用pip3命令安装了pytorch。但是,当我尝试导入手电筒时,出现了错误。
最初,出现另一个错误,指出numpy版本不匹配,我将numpy更新为最新版本。
import torch
RuntimeError Traceback (most recent call last)
<ipython-input-10-c031d3dd82fc> in <module>()
----> 1 import torch
C:\Users\iamuraptha\Anaconda3\lib\site-packages\torch\__init__.py in <module>()
82 pass
83
---> 84 from torch._C import *
85
86 __all__ += [name for name in dir(_C)
RuntimeError: generic_type: cannot initialize type "TensorProtoDataType": an object with that name is already defined
我重新安装了anaconda,然后为pytorch创建了一个虚拟环境。现在一切正常
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句