ModuleNotFoundError: No module named 'ultralytics.utils'
时间: 2023-08-27 16:15:16 浏览: 339
引用提到了一种解决方法,即在train.py的开头添加以下代码:import sys sys.path.append("/home/shares/myproj/other_tasks/yolov8/"),其中"/home/shares/myproj/other_tasks/yolov8/"是ultralytics文件夹所在的绝对路径。这样做可以将ultralytics文件夹的路径添加到系统的模块搜索路径中,以便能够正确导入ultralytics模块和其下的utils模块。通过这样的操作,您应该能够解决ModuleNotFoundError: No module named 'ultralytics.utils'的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [[yoloV5项目 - error] torch.load() 出现 No module named ‘models](https://blog.csdn.net/weixin_41809530/article/details/116446002)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *3* [【报错集锦】yolov8报错ModuleNotFoundError: No module named ‘ultralytics](https://blog.csdn.net/qq_41226186/article/details/130691105)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文