您好,请问我前面配置都是成功的,在测试这一步
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "F:\Anaconda3\envs\pytorch\lib\site-packages\torch\__init__.py", line 190, in <module>
from torch._C import *
ValueError: module functions cannot set METH_CLASS or METH_STATIC
>>> import torchvision
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "F:\Anaconda3\envs\pytorch\lib\site-packages\torchvision\__init__.py", line 4, in <module>
from .extension import _HAS_OPS
File "F:\Anaconda3\envs\pytorch\lib\site-packages\torchvision\extension.py", line 51, in <module>
_register_extensions()
File "F:\Anaconda3\envs\pytorch\lib\site-packages\torchvision\extension.py", line 11, in _register_extensions
import torch
File "F:\Anaconda3\envs\pytorch\lib\site-packages\torch\__init__.py", line 190, in <module>
from torch._C import *
RuntimeError: generic_type: cannot initialize type "TensorProtoDataType": an object with that name is already defined
>>> print(torch.__version__)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'torch' is not defined
请问您知道以上是什么原因吗?装了很久,我按照CUDA为11.0(查询我电脑控制面板得到的)和none进行安装,最后测试这一步都不行。
Win10+Anaconda环境下安装Pytorch1.安装说明 本教程使用Anaconda建立Pytorch虚拟环境来安装Pytorch。 为什么要使用Anaconda虚拟环境安装Pytorch? 因为环境中通常需要安装很多...