A problem with convert yolov8 recognition sys to exe by pyinstaller

huangapple go评论72阅读模式
英文:

A problem with convert yolov8 recognition sys to exe by pyinstaller

问题

我使用Python 3.9.13和Pyinstaller,当我使用以下命令将项目转换为exe文件时,出现了以下问题:

无法找到ultralytics\yolo\..等

无法找到ultralytics\yolo\..等

当我删除--onefile标志时,没有ultralytics文件夹与其他库一起出现。
是否有任何帮助?

注意:我使用了resource_path()函数。

英文:

I use Pyinstaller with Python 3.9.13,when i use this commend "pyinstaller interface.py --onefile -w"
to convert the project to exe file ,I have this problem :

it is can not find ultralytics\yolo\..etc

it is can not find ultralytics\yolo\..etc

when I removed --onefile flag, there is no ultralytics folder with other libs.
any help?

Note : I use resource_path() function.

答案1

得分: 1

我遇到了同样的问题,并在ultralytic的GitHub讨论区找到了一个类似的问题。在那里,用户"dh031200"在3月15日的这个链接中的回答帮助我解决了这个问题。这位用户描述的5个步骤也可以解决您的问题。在这里,只需要在第1步将"install from source pip install -e '.[dev]'"更改为"install from source pip install -e .[dev]",即应该去掉".[dev]"周围的引号。

英文:

i had the same problem and found a similar question on ultralytic's github discussions section. There, the answer of the user "dh031200" on March 15 in this link helped me to solve this problem. The 5 steps this user describes can solve your problem too. There, only at step 1 change "install from source pip install -e '.[dev]'" to "install from source pip install -e .[dev]", i.e. the quotation marks around .[dev] should be removed.

huangapple
  • 本文由 发表于 2023年6月16日 14:57:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/76487654.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定