【问题标题】:Trying this -->"converting YOLO V5 Ultralytics model and config format into Darknet format" # I get this errorTrying this -->"converting YOLO V5 Ultralytics model and config format into Darknet format" # 我得到这个错误
【发布时间】:2022-01-24 10:43:21
【问题描述】:

AttributeError Traceback(最近一次调用最后一次) 在 () 4 使用 open(cfg_file_name, 'w') 作为 cfg: 5 与 open(yaml_file_name,'r') 作为 f: ----> 6 f = yaml.load(f,Loader=yaml.FullLoader) 7 净 = 0 8 代表 f 中的 l:

AttributeError: 模块 'yaml' 没有属性 'FullLoader'

【问题讨论】:

  • 用这个命令解决了这个问题 --> !pip install PyYaml==5.1 它会工作

标签: yolov5


【解决方案1】:

安装收集的包:PyYaml 尝试卸载:PyYaml 找到现有安装:PyYAML 5.4.1 卸载 PyYAML-5.4.1: 成功卸载 PyYAML-5.4.1 成功安装 PyYaml-5.1 警告:您使用的是 pip 版本 20.3.4;但是,版本 21.3.1 可用。 您应该考虑通过“/usr/bin/python -m pip install --upgrade pip”命令进行升级。 dmjang@a4000:~/work/yolov5$ python3 gen_wts_yoloV5.py -w yolov5n.pt YOLOv5 ? v6.0-255-gca0a007 火炬 1.10.2+cu113 CPU

Traceback(最近一次调用最后一次): 文件“gen_wts_yoloV5.py”,第 133 行,在 f = yaml.load(f,Loader=yaml.FullLoader) AttributeError: 模块 'yaml' 没有属性 'FullLoader'

还没有解决... 接下来我尝试了 pip3 命令而不是 pip。 这样就解决了。

【讨论】:

  • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
猜你喜欢
  • 1970-01-01
  • 2023-03-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-11-06
  • 1970-01-01
相关资源
最近更新 更多