torch vision install issues

Hi I installed with success torch on Jetson Xavier and Python 3.6 using the Whl you shared.

But When I try to install torchvision I get errors:

aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/home/romain/vision/torchvision/csrc -I/home/romain/.local/lib/python3.6/site-packages/torch/lib/include -I/home/romain/.local/lib/python3.6/site-packages/torch/lib/include/TH -I/home/romain/.local/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c /home/romain/vision/torchvision/csrc/vision.cpp -o build/temp.linux-aarch64-3.6/home/romain/vision/torchvision/csrc/vision.o -O0 -DTORCH_EXTENSION_NAME=_C -DTORCH_EXTENSION_NAME=_C_tests -std=c++11
:0:0: warning: “TORCH_EXTENSION_NAME” redefined
:0:0: note: this is the location of the previous definition
In file included from /home/romain/vision/torchvision/csrc/ROIAlign.h:3:0,
from /home/romain/vision/torchvision/csrc/vision.cpp:1:
/home/romain/vision/torchvision/csrc/cpu/vision_cpu.h:2:10: fatal error: torch/extension.h: No such file or directory
#include <torch/extension.h>
^~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command ‘aarch64-linux-gnu-gcc’ failed with exit status 1

Can any one help me ? thanks

Hmm, which version of PyTorch and torchvision are you installing?

I just tried again building torchvision v0.3.0 and v0.4.0 against PyTorch v1.2.0 for Python 3.6 on Xavier (following the instructions from this thread), and both v0.3.0 / v0.4.0 built and ran without issues.

One thing I noticed, is my include directories on the compile line appear slightly different than yours:

aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/media/nvidia/WD_BLUE_2.5_1TB/pytorch/torchvision/torchvision-v0.4.0/test -I/media/nvidia/WD_BLUE_2.5_1TB/pytorch/torchvision/torchvision-v0.4.0/torchvision/csrc/models -I/home/nvidia/.local/lib/python3.6/site-packages/torch/include -I/home/nvidia/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/nvidia/.local/lib/python3.6/site-packages/torch/include/TH -I/home/nvidia/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c /media/nvidia/WD_BLUE_2.5_1TB/pytorch/torchvision/torchvision-v0.4.0/torchvision/csrc/models/vgg.cpp -o build/temp.linux-aarch64-3.6/media/nvidia/WD_BLUE_2.5_1TB/pytorch/torchvision/torchvision-v0.4.0/torchvision/csrc/models/vgg.o -O0 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C_tests -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11

Mine has ‘~/.local/lib/python3.6/site-packages/torch/include’, but yours has ‘~/.local/lib/python3.6/site-packages/torch/lib/include’.

I’m not sure if it’s just a difference in the version of PyTorch version we have installed, but on my system with PyTorch v1.2.0 '~/.local/lib/python3.6/site-packages/torch/lib/` only has shared objects and no include directory under it or headers. The headers are under ‘~/.local/lib/python3.6/site-packages/torch/include’.