英文:
Torch error running YOLOv5 on Jetson Nano
问题
我正在尝试在Jetson Nano(Ubuntu 20.04和Python 3.8)的GPU上运行YOLOv5。我已经使用以下命令设置了YOLOv5:
git clone https://github.com/ultralytics/yolov5
cd yolov5
pip install -r requirements.txt
然后,我尝试运行detect.py文件(使用基础权重和测试数据),但我遇到了这个错误:
Traceback (most recent call last):
File "detect.py", line 37, in <module>
import torch
File "/home/jetson/.local/lib/python3.8/site-packages/torch/__init__.py", line 198, in <module>
_load_global_deps()
File "/home/jetson/.local/lib/python3.8/site-packages/torch/__init__.py", line 151, 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: libcublas.so.11: 无法打开共享对象文件: 没有那个文件或目录
英文:
I am trying to run YOLOv5 with the Jetson Nano (Ubuntu 20.04 and Python 3.8) gpu. I have setup YOLOv5 with these commands
git clone https://github.com/ultralytics/yolov5
cd yolov5
pip install -r requirements.txt
I then attempted to run the detect.py file (that uses the base weights and testing data) and I got this error:
Traceback (most recent call last):
File "detect.py", line 37, in <module>
import torch
File "/home/jetson/.local/lib/python3.8/site-packages/torch/__init__.py", line 198, in <module>
_load_global_deps()
File "/home/jetson/.local/lib/python3.8/site-packages/torch/__init__.py", line 151, 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: libcublas.so.11: cannot open shared object file: No such file or directory
答案1
得分: 0
这是由于PyTorch版本与Jetson Nano不兼容引起的。要在Jetson Nano上安装torch,您需要安装Jetson Nano版本的torch。
英文:
This was caused by the Pytorch version not being compatable with the Jetson Nano. To install torch on the Jetson Nano you need to install the Jetson Nano verison of torch.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论