I have trouble importing PyTorch in my jetson nano (jetpack 4.4).I have successfully installed it from .whl file. please help.
Traceback (most recent call last):
File "/code/catkin_ws/src/duckietown-safe-ml-demo/packages/safe_ml/src/ood_node.py", line 13, in <module>
import torch
File "/usr/local/lib/python3.6/dist-packages/torch/__init__.py", line 188, in <module>
_load_global_deps()
File "/usr/local/lib/python3.6/dist-packages/torch/__init__.py", line 141, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libmpi_cxx.so.20: cannot open shared object file: No such file or directory
<== Entrypoint
Reading package lists… Done
Building dependency tree
Reading state information… Done
libopenmpi-dev is already the newest version (4.0.3-0ubuntu1).
libopenblas-base is already the newest version (0.3.8+ds-1ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 289 not upgraded.
==> Launching app…
Traceback (most recent call last):
File “/code/catkin_ws/src/duckietown-safe-ml-demo/packages/safe_ml/src/ood_node.py”, line 13, in
import torch
File “/usr/local/lib/python3.6/dist-packages/torch/init.py”, line 188, in
_load_global_deps()
File “/usr/local/lib/python3.6/dist-packages/torch/init.py”, line 141, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
File “/usr/lib/python3.6/ctypes/init.py”, line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libmpi_cxx.so.20: cannot open shared object file: No such file or directory
^C^C^C<== App terminated!
Seems to be the solution, however, it mentions that you need to install those dependencies before installing the pytorch wheel. Can you try reinstalling pytorch ?