# Install Pytorch & torchvision on Jetson Xavier NX
###### tags: `Jetson Xavier NX`
**This is install for python 3.x .**
## Pytorch
>The Jetpack version is 4.5 so I need to install pytorch v1.7 .[color=#c2f455]
```command
wget https://nvidia.box.com/shared/static/cs3xn3td6sfgtene6jdvsxlr366m2dhq.whl -O torch-1.7.0-cp36-cp36m-linux_aarch64.whl
```
```command
sudo apt-get install python3-pip libopenblas-base libopenmpi-dev
```
```command
pip3 install Cython
```
```command
pip3 install numpy torch-1.7.0-cp36-cp36m-linux_aarch64.whl
```
## Torchvision
> To install torchvision first you have to check the corresponding version to CUDA.[color=#ed9017]

> In my case, I had install the pytorch v1.7 so the version of torchvision should be v0.8.1 .[color=#ed9017]
```command
sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libavcodec-dev libavformat-dev libswscale-dev
```
```command
git clone --branch v0.8.1 https://github.com/pytorch/vision torchvision
```
```command
cd torchvision
```
```command
export BUILD_VERSION=0.8.1
```
```command
sudo python3 setup.py install
```
```
pip3 uninstall pillow
```
```
pip3 install pillow==8.4.0
```
```command
cd ../
```
## Reference
https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-7-0-now-available/72048