Traceback (most recent call last):
File “/home/nvidia/catkin_ws/src/ab3d/src/modelROS.py”, line 15, in
import torch
File “/home/nvidia/anaconda3/envs/AB3D/lib/python3.8/site-packages/torch/init.py”, line 198, in
_load_global_deps()
File “/home/nvidia/anaconda3/envs/AB3D/lib/python3.8/site-packages/torch/init.py”, line 151, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
File “/home/nvidia/anaconda3/envs/AB3D/lib/python3.8/ctypes/init.py”, line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: libmpi_cxx.so.40: cannot open shared object file: No such file or directory
Firstly, thank you for your reply.
However, I have installed openmpi previously, but I still get this error, because apt in ubuntu18.04 can only get openmpi=2.1, which doesn’t have libmpi_cxx_so.40.
If I input the command, it show:
Hi @3356383019, your original post above said you were on JetPack 5 - which is based on Ubuntu 20.04, and would have installed libmpi_cxx.so.40. If you are in fact on JetPack 4 and Ubuntu 18.04, then you should install one of the PyTorch wheels built for JetPack 4 instead.
I manually upgrade jetpack to 5.0, because my virtual environment is based on python 3.8, but all the Pytorch wheels built for jetpack4 use python3.6. Can I use these wheel on python3.8? Or do you have Pytorch wheels built for jetpack4 use python3.8?
It’s the later - you would need to rebuilt PyTorch for JetPack 4 and Python 3.8. This is because the versions of CUDA in JetPack 4 (CUDA 10.2) are different than JetPack 5 (CUDA 11.4).
There are Build from Source instructions under PyTorch for Jetson. Or since you are on Xavier, you could just reflash your device with JetPack 5 and use Ubuntu 20.04 / Python 3.8 straight away (which is what I’d probably recommend, baring other factors that you might have)