Torchvision can't install: Illegal instruction

Hi,
I tried to install pytorch1.6 and torchvison 0.7.0 on Jetson NX (jetpack 4.5.1, python3.6)
I install pytorch1.6 sucessfully.
but when I install torchvison 0.7.0, I meet the error: Illegal instruction
I already export OPENBLAS_CORETYPE=ARMV8 , but still not work.
method i use:

git clone -b v0.7.0 https://github.com/pytorch/vision torchvision
sudo apt-get install libjpeg-dev zlib1g-dev python3-pip
cd torchvision
export BUILD_VERSION=0.7.0
sudo python3 setup.py install

how to solve this: Illegal instruction problem?

1 Like

Hi @XiangjiBU, I wonder if since you are running setup.py with sudo, it is not picking up the OPENBLAS_CORETYPE=ARMV8 environment variable that you set, because it is now root?

Some things to try after setting export OPENBLAS_CORETYPE=ARMV8:

  1. Just run python3 and import torch (no sudo). Does it still crash?
  2. Build PyTorch with python3 setup.py install --user instead
  3. Try import numpy. Does it crash? If so, it is still the numpy issue.

I use python3 setup.py install --user to install torchvision, it works, thanks !