jetpack5.1.3安装jtop报错

本文介绍了在安装并运行JetsonStats工具时遇到的ZeroDivisionError问题,焦点在于修复`/usr/local/lib/python3.8/dist-packages/jtop/gui/pengine.py`文件中的pass_orin函数,以确保jtop界面正常显示。
摘要由CSDN通过智能技术生成

安装jetson-stats(前提:安装pip3)

sudo pip3 install jetson-stats

执行jtop,根据提示需要重启服务

  1. sudo systemctl restart jtop.service

  2. sudo jtop

正常显示jtop界面,如遇到下面报错信息:

File "/usr/local/bin/jtop", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/jtop/main.py", line 160, in main
curses.wrapper(JTOPGUI, jetson, pages, init_page=args.page,
File "/usr/lib/python3.8/curses/init.py", line 105, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 100, in init
self.run(loop, seconds)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 129, in run
self.draw()
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 143, in draw
page.draw(self.key, self.mouse)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/pall.py", line 190, in draw
func(self.stdscr, pos_y_mini_menu, column_width * nline, column_width, column_height, self.jetson)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/pengine.py", line 115, in compact_engines
size_eng = size_table // len(row) - 1
ZeroDivisionError: integer division or modulo by zero

修改 /usr/local/lib/python3.8/dist-packages/jtop/gui/pengine.py 文件中的下面函数,即可正常。
def pass_orin(engine):
return [
add_engine_in_list('APE', engine, 'APE', 'APE') + add_engine_in_list('PVA0a', engine, 'PVA0', 'PVA0_CPU_AXI'),
add_engine_in_list('DLA0c', engine, 'DLA0', 'DLA0_CORE') + add_engine_in_list('DLA1c', engine, 'DLA1', 'DLA1_CORE') + add_engine_in_list('DLA1c', engine, 'DLA', 'DLA1_CORE'),
add_engine_in_list('NVENC', engine, 'NVENC', 'NVENC') + add_engine_in_list('NVDEC', engine, 'NVDEC', 'NVDEC'),
add_engine_in_list('NVJPG', engine, 'NVJPG', 'NVJPG') + add_engine_in_list('NVJPG1', engine, 'NVJPG', 'NVJPG1'),
add_engine_in_list('SE', engine, 'SE', 'SE') + add_engine_in_list('VIC', engine, 'VIC', 'VIC'),
]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值