Error during install of torchvision

Trying to install torchvision by downloading it from a branch and executing command python3 setup.py install

Getting error : /root/torchvision/torchvision/csrc/ops/quantized/cpu/qnms_kernel.cpp:2:10: fatal error: ATen/native/quantized/affine_quantizer.h: No such file or directory 2 | include <ATen/native/quantized/affine_quantizer.h>"

Using torch 2.1.0a0+41361538.nv23.06, Python 3.8.10, jetpack 5.3, cuda_11.4.r11.4/compiler.31964100_0

Hi,

Do you compile TorchVision from the source or install it with pip?

Please try to build it from the source.
You can find the instructions in the below topic:

Thanks.

I compile it

If I could just get 2 links of torch and torchvision which are compatible with jetpack 5.1 that’d be so great, it is annoying all these links that lead to stuff that are incompatible

something like: Torch: www.blabla Torchvision: www.bleble

Hi,

If the docker container is acceptable, you can try our l4t-pytorch or l4t-ml container.

These containers have PyTorch, TorchVision, and TorchAudio pre-installed.
So you don’t need to install them manually and no need to check the compatibility.

Thanks.

I was able to compile both torch and torchvision, but whenever I run ultralytics it just removes them and replaces them with its own versions which, unsurprisingly, do not work

There must be a way to prevent a system to download automatically packages, messing up the system

@sequential_systems yes, it by using jetson-containers which are setup to use my pip mirror. That will keep the GPU versions of torch/torchvision/ect installed.

Interesting observation. If there is a pip mirror, wouldn’t be perhaps easier to set up ubuntu to use it whenever it needs to update something?

For in Ubuntu you can define where it finds everything, and the ones that comes with jet packs are customised in many places by nvidia anyways

That way we avoid the problem of people messing up the system by just doing an apt upgrade, and we keep happy those who can’t use or hate containers. My humble 5 cents

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.