TorchVision not found error after successful installation

On my custom Xavier AGX board, I have managed to succesfully install Pytorch v. 1.9.0 using the instructions found here.

wget -O torch-1.9.0-cp36-cp36m-linux_aarch64.whl 
sudo apt-get install python3-pip libopenblas-base libopenmpi-dev 
sudo pip3 install Cython
sudo pip3 install numpy torch-1.9.0-cp36-cp36m-linux_aarch64.whl

The following lines:

import torch
print  (torch.__version__)

produce this output:


So, I guess, PyTorch has been successfully installed.

I then went on to install the corresponding TorchVision version, i.e. 0.10.0:

sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libavcodec-dev libavformat-dev libswscale-dev
git clone --branch release/0.10 torchvision
cd torchvision
export BUILD_VERSION=0.10.0
sudo python3 install --user

Below is part of the output messages I got during installation:

Installed /home/nvidia/.local/lib/python3.6/site-packages/torchvision-0.10.0a0+ca1a620-py3.6-linux-aarch64.egg
Processing dependencies for torchvision==0.10.0a0+ca1a620
Searching for pillow>=5.3.0
Reading Links for Pillow
Best match: Pillow 8.4.0
Processing Pillow-8.4.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Installing Pillow-8.4.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl to /home/nvidia/.local/lib/python3.6/site-packages
Adding Pillow 8.4.0 to easy-install.pth file
Installed /home/nvidia/.local/lib/python3.6/site-packages/Pillow-8.4.0-py3.6-linux-aarch64.egg

Searching for torch==1.9.0
Best match: torch 1.9.0
Adding torch 1.9.0 to easy-install.pth file
Installing convert-caffe2-to-onnx script to /home/nvidia/.local/bin
Installing convert-onnx-to-caffe2 script to /home/nvidia/.local/bin

So, I guess that TorchVision installation is ok as well. But unfortunately this isn’t the case:

import torchvision

gives me the error:

Traceback (most recent call last):
File “”, line 1, in
ModuleNotFoundError: No module named ‘torchvision’

Does anyone can provide some hint on what could be the problem here?


The log of torchvision only has the dependency part.
We cannot find the installation details (success or failure) about torchvision.

Is this all the output log?
If not, could you attach the complete output log for installing torchvision with us first?


Thanks for the reply.

It turns out the issue was due to TorchVision being installed in /home/nvidia/.local instead of /usr/local/lib/python3.6/dist-packages. .local was under root:root ownership. After I did a chown of .local to nvidia:nvidia problem was solved.

Any idea why .local folder was chosen by pip3 install?


It depends on the authority when running the installation.

For example, with pip3 --user.
It may install the library under home since no permission to write the file under /usr/local/


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