Unable to install pytorch and torchvision on Jetson Nano board

To implement a model for my project, I would require pytorch and torchvision installed on the Jetson nano 2GB developer kit. I had referred many procedures and tried to install the same but in vain. Python is successfully installed, but installation of pytorch, torchvision and Jupyter lab has become a huge road block to proceed further. I have a working python script. But to implement the same on the board and train my model the above libraries are necessary. Could you guide me through this, so that I will be able to complete my project. Below is the error I get multiple times.

Assembler messages:
Fatal error: can’t create build/temp.linux-aarch64-3.6/scratch/tmp/timer_createi92oef9_.o: No such file or directory
** The above error about timer_create is normal and not a problem! **
no timer_create, linking librt
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 -I/usr/local/include -Izmq/utils -c build/temp.linux-aarch64-3.6/scratch/vers.c -o build/temp.linux-aarch64-3.6/scratch/vers.o
build/temp.linux-aarch64-3.6/scratch/vers.c:4:10: fatal error: zmq.h: No such file or directory
#include “zmq.h”
compilation terminated.

error: command 'aarch64-linux-gnu-gcc' failed with exit status 1

Warning: Couldn't find an acceptable libzmq on the system.

from packaging import tags
ModuleNotFoundError: No module named 'packaging'


Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-pokpwvc9/pyzmq/

Hi @user3210, it appears that ZMQ library is missing, have you installed the required dependencies for the packages you are trying to install?

BTW if you still encounter build errors, I recommend to try the l4t-ml container, which includes PyTorch/torchvision/JupyterLab already installed: https://ngc.nvidia.com/catalog/containers/nvidia:l4t-ml

Thank you… after installing the ZMQ the installation is a success.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.