pyinstaller打包后程序执行出现Error locating target 'ISAT.segment_any.sam2.modeling.backbones.hieradet.Hiera' #329
Replies: 11 comments
-
|
提交issue前,可以先看看之前有没有解决方案。 |
Beta Was this translation helpful? Give feedback.
-
是模型加载的问题 https://github.com/yatengLG/ISAT_with_segment_anything/issues/239我在源码执行是能成功的 打包后会出现Error locating target 'ISAT.segment_any.sam2.modeling.backbones.hieradet.Hiera' |
Beta Was this translation helpful? Give feedback.
-
|
说的就是源码没问题啊。是你打包的问题T.T 打包的时候用 -D 打包成文件夹,别用-F打包成单个文件。 然后,打包完运行的时候(可能打包的时候会缺东西,缺依赖,缺包,缺配置文件等),自己手动复制到打包的文件内就好了 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
这不是提示有嘛? set env var HYDRA_FULL_ERROR=1 to see chained exception 设置环境变量 HYDRA_FULL_ERROR=1 查看链式异常 和配置文件没关系啊 |
Beta Was this translation helpful? Give feedback.
-
这样设置后再执行打包命令 pyinstaller -D main.py
|
Beta Was this translation helpful? Give feedback.
-
对啊,不然不知道真正的报错是是啊。 这个大概就是各种依赖问题,自己慢慢调就行,和代码一点关系都没有。 还有,真有必要打exe嘛?打完可是好几个G呢。。。 |
Beta Was this translation helpful? Give feedback.
-
我尝试在代码里面设置环境变量 在进行打包还是Init SAM2 video Error: Error locating target 'ISAT.segment_any.sam2.modeling.backbones.hieradet.Hiera', set env var HYDRA_FULL_ERROR=1 to see chained exception 打包exe是因为想把数据标注外包出去 第三方没有python环境 |
Beta Was this translation helpful? Give feedback.
-
|
那不清楚了,你试一下其他模型。如果非sam2模型可以的话,大概和hydra这个库有关系,你再排查下吧。 |
Beta Was this translation helpful? Give feedback.
-
好的 大佬 非常感谢你能在百忙之中回答我的问题 |
Beta Was this translation helpful? Give feedback.
-
|
如果没有视频分割的需求,使用其他模型也一样的(推荐sam-hq系列模型)。可能就不报这个错了,你试一试吧 |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
Beta Was this translation helpful? Give feedback.
All reactions