I trying to use trt_pose and following githabpage “Getting started Step1.1” I downloaded “pytorch” and “torchvision”.
I tested it according to this page and it seemed to work properly.
The text below is the result of the test
$ python3
Python 3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import torch
>>> print(torch.version)
2.0.0+nv23.05
>>> print('CUDA available: ' + str(torch.cuda.is_available())) CUDA available: True
>>> print('cuDNN version: ’ + str(torch.backends.cudnn.version()))
cuDNN version: 8600
>>> a = torch.cuda.FloatTensor(2).zero_()
>>> print('Tensor a = ’ + str(a))
Tensor a = tensor([0., 0.], device=‘cuda:0’)
>>> b = torch.randn(2).cuda()
>>> print('Tensor b = ’ + str(b))
Tensor b = tensor([-1.0415, -0.2904], device=‘cuda:0’)
>>> c = a + b
>>> print('Tensor c = ’ + str(c))
Tensor c = tensor([-1.0415, -0.2904], device=‘cuda:0’)
>>> import torchvision Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'torchvision'
>>>
[2]+ Stopped python3
But I try “sudo python3 setup.py install --plugins”
Traceback (most recent call last):
File “setup.py”, line 3, in
import torch
ModuleNotFoundError: No module named ‘torch’
why doesn’t it recognize pytorch?