admin管理员组文章数量:1336104
I installed torch==1.13.0+cu116
and ran Python on the terminal. Then, I did import torch
, but I got the following error:
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/work/temp/venv/lib/python3.8/site-packages/torch/__init__.py", line 231, in <module>
obj.__module__ = 'torch'
TypeError: can't set attributes of built-in/extension type 'torch._C.DisableTorchFunctionSubclass'
I'm using Python 3.8.10, nvcc release 11.6, and driver version 535.104.05
But the following command not show an error message
pip install torch==2.3.1 --index-url `
Why is this error occurring?
本文标签:
版权声明:本文标题:python - import torch throws TypeError: can't set attributes of built-inextension type 'torch._C.DisableTorchFun 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742307016a2450117.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论