문제(Problem)

아래와 같은 에러를 마주하셨나요?

No such file or directory: ''C:\Users .. ultralytics\yolo\cfg\default.yaml. 


 

[Kor]

안녕하세요. 오늘은 Yolo8을 사용하면서 PyInstaller를 이용해 yolov8을 .exe로 패키징 하는 과정에서 마주한 에러인데요.

해결 방법에 대해서 소개해보도록 하겠습니다.

 

  • 문제 원인: Pyinstaller의 path 문제인데요!
  • 아나콘다가상환경/site-packages/ultralytics/ 에 가면 yolo/cfg/default.yaml이 있습니다.
    • 걔의 경로를 바꿔주셔야해요. Pyinstaller는 ROOT 를 모르는 것 같습니다. 
  • 찾아가야하는곳 : C:\Users\user\Anaconda3\envs\(virtual environment name)\Lib\site-packages\ultralytics\yolo\utils\__init__.py

Figure 1. (34 line), 34번째줄

=> 34번째 줄에 ROOT 저기가 맞지 않아서 그런 것 같아서 절대경로로 적어줄게요.

수정해서 한 번 진행해보세요 :)

 


 

[ENG]

Hi Guys! Today, i faced a error which is for making yolov8 model to .exe using pyinstaller.

I'm gonna introduce how to solve this problem!

 

  • Cause: Path for PyInstaller
  • If you go to anaconda virtual environment path, you can identify "yolo/cfg/default.yaml" file there.
  • The problem is .exe file can't read above .yaml file

You need to go: C:\Users\user\Anaconda3\envs\(virtual environment name)\Lib\site-packages\ultralytics\yolo\utils\__init__.py

Figure 1. (34 line), 34번째줄

You need to change red line as absolute path

 

* Reference Link: https://github.com/orgs/ultralytics/discussions/1356

+ Recent posts