# Torchvision can't install: Illegal instruction

**URL:** <https://forums.developer.nvidia.com/t/torchvision-cant-install-illegal-instruction/174531>\
**Category:** Jetson AGX Xavier\
**Tags:** pytorch\
**Created:** [April 8, 2021, 9:44am UTC](https://forums.developer.nvidia.com/t/torchvision-cant-install-illegal-instruction/174531 "2021-04-08T09:44:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![XiangjiBU](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@XiangjiBU](https://forums.developer.nvidia.com/u/XiangjiBU)\
**Post date:** [April 8, 2021, 9:44am UTC](https://forums.developer.nvidia.com/t/torchvision-cant-install-illegal-instruction/174531/1 "2021-04-08T09:44:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dusty\_nv](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/dusty_nv/32/14043_2.png) [@dusty\_nv](https://forums.developer.nvidia.com/u/dusty_nv)\
**Post date:** [April 8, 2021, 2:19pm UTC](https://forums.developer.nvidia.com/t/torchvision-cant-install-illegal-instruction/174531/2 "2021-04-08T14:19:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![XiangjiBU](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@XiangjiBU](https://forums.developer.nvidia.com/u/XiangjiBU)\
**Post date:** [April 9, 2021, 6:40am UTC](https://forums.developer.nvidia.com/t/torchvision-cant-install-illegal-instruction/174531/3 "2021-04-09T06:40:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 18, 2021, 6:19pm UTC](https://forums.developer.nvidia.com/t/torchvision-cant-install-illegal-instruction/174531/4 "2021-10-18T18:19:57Z")

</div>

Closed on October 18, 2021, 6:19pm UTC


