Traceback (most recent call last): File "D:\yolov7-lpr\yolov7_plate-master\utils\general.py", line 117, in check_requirements pkg.require(r) File "D:\Anaconda\lib\site-packages\pkg_resources\__init__.py", line 886, in require needed = self.resolve(parse_requirements(requirements)) File "D:\Anaconda\lib\site-packages\pkg_resources\__init__.py", line 772, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'onnx>=1.8.1' distribution was not found and is required by the application During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:/yolov7-lpr/yolov7_plate-master/detect.py", line 196, in <module> check_requirements(exclude=('tensorboard', 'pycocotools', 'thop')) File "D:\yolov7-lpr\yolov7_plate-master\utils\general.py", line 121, in check_requirements print(subprocess.check_output(f"pip install '{r}'", shell=True).decode()) File "D:\Anaconda\lib\subprocess.py", line 415, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "D:\Anaconda\lib\subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'pip install 'onnx>=1.8.1'' returned non-zero exit status 105.
时间: 2023-06-27 11:04:52 浏览: 246
这个错误提示是说在运行程序之前需要安装 onnx 版本号大于等于 1.8.1 的依赖,但你的电脑上没有找到符合要求的 onnx 包。可以尝试使用以下命令安装 onnx:
```pip install onnx>=1.8.1```
如果还是无法解决问题,可以尝试升级 pip 或者使用 conda 安装 onnx 包。
相关问题
Traceback (most recent call last): File "D:/yolov7-lpr/yolov7_plate-master/plate_recognition/lprnet_plate_recognition.py", line 41, in <module> result = lprnet_plate_recognition("D:\yolov7-lpr\yolov7_plate-master\imgs\police.jpg", "D:\yolov7-lpr\yolov7_plate-master\weights\Final_LPRNet_model.pth") File "D:/yolov7-lpr/yolov7_plate-master/plate_recognition/lprnet_plate_recognition.py", line 10, in lprnet_plate_recognition model.eval() AttributeError: 'collections.OrderedDict' object has no attribute 'eval'这段报错是什么意思
这报错意味着你的代码中使用了一个名为"model"的对象,但它是一个有序字典(OrderedDict)类型的对象,该类型没有名为"eval"的属性。这通常表示你的模型没有被正确加载或初始化。你需要检查你的代码,确保正确加载了你的模型,并且确保模型是PyTorch的nn.Module类型的对象,才能调用eval()方法。
Traceback (most recent call last): File "D:/yolov7-lpr/yolov7_plate-master/detect_rec_plate.py", line 9, in <module> from models.experimental import attempt_load File "D:\yolov7-lpr\yolov7_plate-master\models\experimental.py", line 7, in <module>
这个错误提示不够完整,无法判断具体原因。但是根据错误提示的第9行和第7行可以判断,这段代码引用了自定义的模块,并且该自定义模块依赖于其他模块或库。可能是你没有正确安装或配置这些依赖项导致的错误。建议你检查一下依赖项是否都已经正确安装,并且确认路径是否正确。如果问题仍然存在,你可以提供更详细的错误信息,以便更好地诊断问题。
阅读全文