{"record":{"id":"8f22571c7deee7d9","repo":"open-mmlab/mmdetection","slug":"trackeval-is-not-installed-please-install-it-by-p","errorCode":null,"errorMessage":"trackeval is not installed,please install it by: pip installgit+https://github.com/JonathonLuiten/TrackEval.gittrackeval need low version numpy, please install itby: pip install -U numpy==1.23.5","messagePattern":"trackeval is not installed,please install it by: pip installgit\\+https://github\\.com/JonathonLuiten/TrackEval\\.gittrackeval need low version numpy, please install itby: pip install -U numpy==1\\.23\\.5","errorType":"validation","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"mmdet/evaluation/metrics/mot_challenge_metric.py","lineNumber":93,"sourceCode":"    \"\"\"\n    TRACKER = 'default-tracker'\n    allowed_metrics = ['HOTA', 'CLEAR', 'Identity']\n    allowed_benchmarks = ['MOT15', 'MOT16', 'MOT17', 'MOT20', 'DanceTrack']\n    default_prefix: Optional[str] = 'motchallenge-metric'\n\n    def __init__(self,\n                 metric: Union[str, List[str]] = ['HOTA', 'CLEAR', 'Identity'],\n                 outfile_prefix: Optional[str] = None,\n                 track_iou_thr: float = 0.5,\n                 benchmark: str = 'MOT17',\n                 format_only: bool = False,\n                 use_postprocess: bool = False,\n                 postprocess_tracklet_cfg: Optional[List[dict]] = [],\n                 collect_device: str = 'cpu',\n                 prefix: Optional[str] = None) -> None:\n        super().__init__(collect_device=collect_device, prefix=prefix)\n        if trackeval is None:\n            raise RuntimeError(\n                'trackeval is not installed,'\n                'please install it by: pip install'\n                'git+https://github.com/JonathonLuiten/TrackEval.git'\n                'trackeval need low version numpy, please install it'\n                'by: pip install -U numpy==1.23.5')\n        if isinstance(metric, list):\n            metrics = metric\n        elif isinstance(metric, str):\n            metrics = [metric]\n        else:\n            raise TypeError('metric must be a list or a str.')\n        for metric in metrics:\n            if metric not in self.allowed_metrics:\n                raise KeyError(f'metric {metric} is not supported.')\n        self.metrics = metrics\n        self.format_only = format_only\n        if self.format_only:\n            assert outfile_prefix is not None, 'outfile_prefix must be not'","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/mmdet/evaluation/metrics/mot_challenge_metric.py#L75-L111","documentation":"MOTChallengeMetric.__init__ raises RuntimeError when the `trackeval` package is not importable. Multi-object-tracking metrics (HOTA, MOTA, etc.) are computed by the external TrackEval library, which mmdet treats as an optional dependency; the message also warns that TrackEval needs numpy<=1.23.5.","triggerScenarios":"Instantiating MOTChallengeMetric (val_evaluator=dict(type='MOTChallengeMetric')) in an environment where `import trackeval` failed (not installed, or failed to import due to a too-new numpy).","commonSituations":"Running MOT/VID tracking evaluation on a default mmdet install; a numpy>=1.24 upgrade breaking trackeval's use of np.float/np.int aliases so the import fails; fresh Docker/CI images without tracking extras.","solutions":["pip install git+https://github.com/JonathonLuiten/TrackEval.git","If trackeval is installed but the import fails, downgrade numpy: pip install -U numpy==1.23.5","Verify with python -c \"import trackeval\" before launching the eval job"],"exampleFix":"// before\n$ python tools/test.py mot_cfg.py ckpt.pth  # RuntimeError: trackeval is not installed\n// after\n$ pip install git+https://github.com/JonathonLuiten/TrackEval.git\n$ pip install -U numpy==1.23.5\n$ python tools/test.py mot_cfg.py ckpt.pth","handlingStrategy":"validation","validationCode":"try:\n    import trackeval  # noqa: F401\n    ok = True\nexcept Exception:\n    ok = False\nif not ok:\n    raise SystemExit('Install: pip install git+https://github.com/JonathonLuiten/TrackEval.git && pip install numpy==1.23.5')","typeGuard":null,"tryCatchPattern":"try:\n    from mmdet.evaluation import MOTChallengeMetric\n    m = MOTChallengeMetric(metric=['mota'])\nexcept RuntimeError as e:\n    if 'trackeval' in str(e):\n        raise SystemExit('Missing trackeval; see install hint in error')\n    raise","preventionTips":["Add trackeval + numpy==1.23.5 pins to tracking Docker/CI images","Check `python -c \"import trackeval\"` before launching MOT eval","Keep a dedicated env for tracking to avoid numpy conflicts with other libs"],"tags":["mmdetection","tracking","mot","trackeval","missing-dependency","numpy"],"backgroundTag":"missing-optional-dependency","analyzedSha":"cfd5d3a985b0249de009b67d04f37263e11cdf3d","analyzedAt":"2026-08-27T20:54:20.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}