FileNotFoundError: [WinError 2] 系统找不到指定的文件和AttributeError: module ‘numpy‘ has no attribute ‘float‘.

报错截图如下:

 找到  

def git_describe(path=Path(__file__).parent) 函数,大家的代码可能不一样,点击代码报错的蓝色文件,会跳转过去的,如果没找到,说明我们原因不一样。
return subprocess.check_output(s, shell=True, stderr=subprocess.STDOUT, encoding='latin-1').rstrip()

将shell = True 改 shell = False

可能会继续出现如下报错

这个numpy版本不一致,

你可以选择将源代码的np.float 替换

self.tlwh = np.asarray(tlwh, dtype=np.float)
self.tlwh = np.asarray(tlwh, dtype=float)

或者更改numpy版本,我这是在YOLOv5+deepsort的任务重中遇到的问题,这个具体版本随着时间会不停的变化,自己尝试一下,一般大于1.20 小于1.24的版本都没问题

猜你喜欢

转载自blog.csdn.net/weixin_45303602/article/details/131418902