Torchvision v0.7.0 install problem

install torchvision v0.7.0 on the Jetson nano. i follow the steps.

sudo apt-get install libjpeg-dev zlib1g-dev
git clone --branch v0.7.0 https://gitee.com/zero-one-game/vision torchvision
cd torchvision 
sudo python3 setup.py install
cd ../  # attempting to load torchvision from build dir will result in import error
pip3 install 'pillow<7'

At the end Terminal output this message:
Using /usr/local/lib/python3.6/dist-packages
Finished processing dependencies for torchvision==0.7.0a0+78ed10c

But it still outputs errors like this
ModuleNotFoundError: No module named ‘torchvision’

How can I solve this problem.

Hi,

Do you import it with python3?

Thanks.

I use python3.6.
I have replaced it with torch1.7 and torchvision0.8. and now it is work in a now conda environment.

I do noting just replace the torch and torchvision, and create a new environment. now, we can see it in the conda list.

Okay. Good to know it works now.

Thanks for the update.

I got this exception:

In file included from /home/sm/Downloads/torchvision/torchvision/csrc/cpu/decoder/memory_buffer.h:3:0,
                 from /home/sm/Downloads/torchvision/torchvision/csrc/cpu/video_reader/VideoReader.cpp:6:
/home/sm/Downloads/torchvision/torchvision/csrc/cpu/decoder/defs.h:12:10: fatal error: libavcodec/avcodec.h: No such file or directory
 #include <libavcodec/avcodec.h>
          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1

Hi @satish, install these prerequisites first:

$ sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libavcodec-dev libavformat-dev libswscale-dev
1 Like

Thanks, that worked