Pyinstaller- File not Found Error: It doesn't find the default.yaml file

303 Views Asked by At

enter image description here

I'm trying to convert Python code to exe using pyinstaller to load custom Yolov5 model like the picture above, but it keeps saying that it cannot find default.yaml. Even the folders behind the Temp folder over there are not actually on my computer. However, in order to resolve the error, I created folders that were not present and renamed the custom Yaml file to the default. yaml. But the same error still comes out. How can I solve it?

I created the folder that error says and added the library yolo, ultralytics, attempt_load. Also, I asked to chat gpt but it still doesn't work it.

1

There are 1 best solutions below

0
On

If there are paths added to default paths in your program, pyinstaller will not recognize them. Therefore, it is necessary to add the paths to pyinstaller as parameters with the key paths.

pyinstaller mycode.py --paths=[PATHS] --onedir