Pytorch error installing, missing files

Hi,
I am trying to install PyTorch for Jetson on my Nvidia Jetson AGX Orin 32GB while following these two documents:

I put everything into one folder while using a virtual environment, with all libraries inside python3.8/site-packages. But I received an error message:

Column 1 Column 2 Column 3 Column 4
python
Python 3.8.10 (default, Nov 22 2023, 10:22:35)
[GCC 9.4.0] on linux
Type help, copyright, credits or license for more information.
>>> import torch
Traceback (most recent call last):
File , line 1, in
File /home/orin/Desktop/AY2425/asli/lib/python3.8/site-packages/torch/init.py, line 195, in
_load_global_deps()
File /home/orin/Desktop/AY2425/asli/lib/python3.8/site-packages/torch/init.py, line 148, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
File /usr/lib/python3.8/ctypes/init.py, line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: libmpi_cxx.so.20: cannot open shared object file: No such file or directory

Tried to follow this person who faced a similar issue: Unable to install pytorch in jetson nano

Found a lot of dependencies that are “not found”, including “libmpi_cxx.so.20”. I cannot seem to install many of the dependencies that are not found using “sudo apt install ”

would appreciate any help, thanks.

Hi,

Sorry for the late update.

When creating the virtual environment, could you try adding the flag below?

Thanks.