Cuda Arch Bin: 8.7
L4T: 36.3.0
Jetpack : 6.0
Machine: aarch64
Distribution: Ubuntu 22.04 Jammy Jellyfish
Python: 3.10.12
Followed the instructions from below link
Below are pre-built PyTorch pip wheel installers for Jetson Nano, TX1/TX2, Xavier, and Orin with JetPack 4.2 and newer.
Download one of the PyTorch binaries from below for your version of JetPack, and see the installation instructions to run on your Jetson. These pip wheels are built for ARM aarch64 architecture, so run these commands on your Jetson (not on a host PC). You can also use the containers from jetson-containers .
PyTorch pip wheels
JetPack 6
PyTorch v2.3.0 JetPack 6.0 (L4T R36.2…
As per my system requirements, I’ve tried installing * torch 2.3 - torch-2.3.0-cp310-cp310-linux_aarch64.whl
my base environment has 3.12 version, so I’ve created a new virtual environment in anaconda with python 3.10.12 and tried installing the above pytorch package there
However, after installation, I noticed that PyTorch was showing version 1.8 instead of 2.3.
And then I’m tried installing torchvision, but it threw an error as “OSError: libmpi_cxx.so.20: cannot open shared object file: No such file or directory” when I was running “python3 setup.py install --user”
I’ve tried two versions of torchvision v0.18.0 and v0.9.0, for both of those version, I was getting the same error.
Any help would be much appreciated!
Hi,
Do you use the package listed in the below topic?
Below are pre-built PyTorch pip wheel installers for Jetson Nano, TX1/TX2, Xavier, and Orin with JetPack 4.2 and newer.
Download one of the PyTorch binaries from below for your version of JetPack, and see the installation instructions to run on your Jetson. These pip wheels are built for ARM aarch64 architecture, so run these commands on your Jetson (not on a host PC). You can also use the containers from jetson-containers .
PyTorch pip wheels
JetPack 6
PyTorch v2.3.0 JetPack 6.0 (L4T R36.2…
If yes, there is a TorchVision prebuilt so you don’t need to build it from the source.
For OSError: libmpi_cxx.so.20: cannot open shared object file: No such file or directory
.
Please run the below command to install the dependency and try it again.
$ sudo apt-get install python3-pip libopenblas-base libopenmpi-dev libomp-dev
Thanks.
Okay, this time I’ve created a new virtual environment with python 3.10.15 version and executed below instructions
wget https://nvidia.box.com/shared/static/p57jwntv436lfrd78inwl7iml6p13fzh.whl -O torch-2.3.0-cp310-cp310-linux_aarch64.whl
sudo apt-get install python3-pip libopenblas-base libopenmpi-dev libomp-dev
pip3 install ‘Cython<3’
pip3 install numpy torch-2.3.0-cp310-cp310-linux_aarch64.whl
Again it installed torch-1.8.0 version instead of 2.3
Output:
pip3 install numpy torch-2.3.0-cp310-cp310-linux_aarch64.whl
Processing ./torch-2.3.0-cp310-cp310-linux_aarch64.whl
Collecting numpy
Using cached numpy-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (63 kB)
Collecting typing-extensions (from torch==2.3.0)
Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Using cached numpy-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.9 MB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Installing collected packages: typing-extensions, numpy, torch
Successfully installed numpy-2.1.3 torch-1.8.0 typing-extensions-4.12.2
after that when I was trying to import torch
I’m again getting same error
self._handle = _dlopen(self._name, mode)
OSError: libmpi_cxx.so.20: cannot open shared object file: No such file or directory
Hi,
Are you able to find the libmpi_cxx.so.20
file in your virtual environment?
If yes, could you try to add the corresponding path to the LD_LIBRARY_PATH to see if it helps?
Thanks.
I was resolve libmpi_cxx.so.20 error, by downgrading my openmpi version to 2.0.4
but now I’m getting “OSError: libcufft.so.10: cannot open shared object file: No such file or directory” error
I think all this is happening because of pytorch version 1.8 is getting installed while I was trying to install pytorch 2.3 as I mentioned earlier
pip3 install numpy torch-2.3.0-cp310-cp310-linux_aarch64.whl --no-cache --force-reinstall
Processing ./torch-2.3.0-cp310-cp310-linux_aarch64.whl
Collecting numpy
Downloading numpy-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (63 kB)
Collecting typing-extensions (from torch==2.3.0)
Downloading typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Downloading numpy-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.9/13.9 MB 12.5 MB/s eta 0:00:00
Downloading typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Installing collected packages: typing-extensions, numpy, torch
Attempting uninstall: typing-extensions
Found existing installation: typing_extensions 4.12.2
Uninstalling typing_extensions-4.12.2:
Successfully uninstalled typing_extensions-4.12.2
Attempting uninstall: numpy
Found existing installation: numpy 2.1.3
Uninstalling numpy-2.1.3:
Successfully uninstalled numpy-2.1.3
Attempting uninstall: torch
Found existing installation: torch 1.8.0
Uninstalling torch-1.8.0:
Successfully uninstalled torch-1.8.0
Successfully installed numpy-2.1.3 torch-1.8.0 typing-extensions-4.12.2
I even tried uninstalling the miniconda and installing it back, but still it was downloading 1.8 version of torch
Below are the dependencies that I’ve found in libtorch_global_deps.so file
linux-vdso.so.1 (0x0000ffff9bf3c000)
libmpi_cxx.so.20 => /opt/openmpi/lib/libmpi_cxx.so.20 (0x0000ffff9bec0000)
libmpi.so.20 => /opt/openmpi/lib/libmpi.so.20 (0x0000ffff9bdc0000)
libcurand.so.10 => /usr/local/cuda/lib64/libcurand.so.10 (0x0000ffff94eb0000)
libcudnn.so.8 => /lib/aarch64-linux-gnu/libcudnn.so.8 (0x0000ffff94e50000)
libcufft.so.10 => not found
libcublas.so.10 => not found
libcudart.so.10.2 => not found
libnvToolsExt.so.1 => /usr/local/cuda/lib64/libnvToolsExt.so.1 (0x0000ffff94e20000)
libgomp.so.1 => /lib/aarch64-linux-gnu/libgomp.so.1 (0x0000ffff94dc0000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffff94da0000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff94bf0000)
libopen-pal.so.20 => /opt/openmpi/lib/libopen-pal.so.20 (0x0000ffff94af0000)
libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffff948c0000)
/lib/ld-linux-aarch64.so.1 (0x0000ffff9bf03000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffff94890000)
libopen-rte.so.20 => /opt/openmpi/lib/libopen-rte.so.20 (0x0000ffff947f0000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff94750000)
librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000ffff94730000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffff94710000)
libpciaccess.so.0 => /lib/aarch64-linux-gnu/libpciaccess.so.0 (0x0000ffff946f0000)
Which seems to be pytorch of1.8
Hi,
Do you use Python 3.10 or a custom Python version?
Could you also try to upgrade pip3
to the latest to see if it works?
$ sudo -H pip3 install --upgrade pip
Thanks.
I was able to resolve the issue by directly downloading the file and installing it, not through wget command
wget https://nvidia.box.com/shared/static/p57jwntv436lfrd78inwl7iml6p13fzh.whl -O torch-2.3.0-cp310-cp310-linux_aarch64.whl
when I did wget, for some reason it was downloading pytorch 1.8 version (I renamed the extension from whl to zip and verified it)
Thanks
Hi,
Thanks for the update.
Good to know it works now.
Maybe wget use the cache file instead of re-downloading.
system
Closed
December 18, 2024, 5:32am
12
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.