https://medium.com/hackers-terminal/installing-pytorch-torchvision-on-nvidias-jetson-tx2-81591d03ce32


$ pip3 install virtualenv

$ virtualenv -p python3 vpy3

$ source vpy3/bin/activate     <==> deactivate


(vpy3) $ wget https://nvidia.box.com/shared/static/mmu3xb3sp4o8qg9tji90kkxl1eijjfc6.whl -O torch-1.1.0-cp36-cp36m-linux_aarch64.whl

(vpy3) $ pip3 install numpy torch-1.1.0-cp36-cp36m-linux_aarch64.whl


(vpy3) $ sudo apt-get install libjpeg-dev zlib1g-dev

(vpy3) $ git clone -b v0.3.0 https://github.com/pytorch/vision torchvision

(vpy3) $ cd torchvision

(vpy3) $ python setup.py install

(vpy3) $ cd ../


Then, test as following;


(vpy3) keonyi@JetsonTx2:~/torchvision/librdkafka$ python3

Python 3.6.9 (default, Nov  7 2019, 10:44:02) 

[GCC 8.3.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

>>> import torch

>>> import torchvision


***** OpenCV install

$ sudo apt install python3-opencv

$ virturalenv vpy3 --python=python3.6

$ source vpy3/bin/activate

(vpy3) $ pip3 install numpy

(vpy3) $ cd vpy3/lib/python3.6/site-packages

(vpy3) $ cp /usr/lib/python3/dist-packages/cv2.cpython-36m-aarch64-linux-gnu.so .


***** TensorFlow install

$ sudo apt-get install software-properties-common

$ sudo apt-get install libboost-dev libboost-all-dev

$ sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev libatlas-base-dev liblmdb-dev libblas-dev libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler

$ sudo apt-get install libfreetype6-dev


$ source vpy3/bin/activate

(vpy3) $ pip3 install -U numpy grpcio absl-py py-cpuinfo psutil portpicker six mock requests gast h5py astor termcolor protobuf keras-applications keras-preprocessing wrapt google-pasta setuptools testresources

(vpy3) $ pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v43 tensorflow-gpu==1.15.0+nv19.12