尧图网络科技YAOTU DIGITAL 获取报价
获取报价
首页 / 资讯中心 / 文章详情

Python 版本不匹配导致 labelimg 闪退

发布时间:2026/9/27 9:36:57

资讯中心
01
ARTICLE

Python 版本不匹配导致 labelimg 闪退

Python 版本不匹配导致 labelimg 闪退
滚轮闪退D:\Anaconda\envs\你安装labelimg的虚拟环境名称\Lib\site-packages\labelImg根据自己的文件存储路径修改找到 labelImg.py修改def scroll_request()函数def scroll_request(self, delta, orientation): units - delta / (8 * 15) bar self.scroll_bars[orientation] # bar.setValue(bar.value() bar.singleStep() * units) bar.setValue(int(bar.value() bar.singleStep() * units))Create RectBox 闪退D:\Anaconda\envs\你安装labelimg的虚拟环境名称\Lib\site-packages\libs根据自己的文件存储路径修改找到 canvas.py修改 # Paint rect 部分代码if self.current is not None and len(self.line) 2: left_top self.line[0] right_bottom self.line[1] rect_width right_bottom.x() - left_top.x() rect_height right_bottom.y() - left_top.y() p.setPen(self.drawing_rect_color) brush QBrush(Qt.BDiagPattern) p.setBrush(brush) lx int(round(left_top.x())) ly int(round(left_top.y())) rw int(round(rect_width)) rh int(round(rect_height)) p.drawRect(lx, ly, rw, rh) # p.drawRect(left_top.x(), left_top.y(), rect_width, rect_height) if self.drawing() and not self.prev_point.isNull() and not self.out_of_pixmap(self.prev_point): p.setPen(QColor(0, 0, 0)) x int(round(self.prev_point.x())) p.drawLine(x, 0, x, int(self.pixmap.height())) # p.drawLine(self.prev_point.x(), 0, self.prev_point.x(), self.pixmap.height()) y int(round(self.prev_point.y())) p.drawLine(0, y, int(self.pixmap.width()), y) # p.drawLine(0, self.prev_point.y(), self.pixmap.width(), self.prev_point.y())
02
RELATED NEWS

相关资讯

更多网站建设与数字化升级内容

03
WHY YAOTU

想打造同款高转化官网?

懂行业、懂生意,从建站到增长一站式陪跑

◈

场景化定制

不做模板站,围绕你的业务场景量身设计,小众不撞款。

◐

营销型架构

以转化目标组织内容与路径,让官网真正带来询盘。

▲

全周期服务

设计、开发、运营、运维一体,上线只是开始。

免费获取你的建站方案

留下需求,专属顾问 24 小时内为你输出方案建议。