Traceback (most recent call last):
File "E:\intersim\miniconda\Lib\site-packages\libs\canvas.py", line 530, in paintEvent
p.drawLine(self.prev_point.x(), 0, self.prev_point.x(), self.pixmap.height())
TypeError: arguments did not match any overloaded call:
drawLine(self, l: QLineF): argument 1 has unexpected type 'float'
drawLine(self, line: QLine): argument 1 has unexpected type 'float'
drawLine(self, x1: int, y1: int, x2: int, y2: int): argument 1 has unexpected type 'float'
drawLine(self, p1: QPoint, p2: QPoint): argument 1 has unexpected type 'float'
drawLine(self, p1: Union[QPointF, QPoint], p2: Union[QPointF, QPoint]): argument 1 has unexpected type 'float'
解决方法:
我的base环境里面使用的是python 3.11,版本过高。创建一个版本较低的python环境。
(base) pip uninstall labelimg
conda create -n labelimg python==3.9
conda activate labelimg
pip install labelimg -i https://pypi.tuna.tsinghua.edu.cn/simple
labelimg的使用教程: