PaddleSeg icon indicating copy to clipboard operation
PaddleSeg copied to clipboard

EISeg and PyInstaller compatibility

Open simoneorlando opened this issue 2 years ago • 1 comments

问题确认 Search before asking

Bug描述 Describe the Bug

Trying to bundle a python app using PyInstaller but I got this import error when the application is run:

    from eiseg import controller
  File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
  File "eiseg\controller.py", line 29, in <module>
    from models import EISegModel
ImportError: cannot import name 'EISegModel' from 'models' (unknown location)

I was able to fix this issue by editing the import in line 29 of the controller.py file from from models import EISegModel to from eiseg.models import EISegModel

However, I would like to do this without having to modify manually the eiseg library. Can you fix this?

复现环境 Environment

-OS: Windows -PaddlePaddle: 2.3.2 -PaddleSeg: 2.6.0

Bug描述确认 Bug description confirmation

  • [X] 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • [ ] 我愿意提交PR!I'd like to help by submitting a PR!

simoneorlando avatar Mar 21 '23 10:03 simoneorlando

@simoneorlando Done, but FYI I think packaging eiseg with PyInstaller very difficult (I tried and failed :joy:), good luck bro.

geoyee avatar Mar 22 '23 07:03 geoyee