PyInstaller + UI Files - FileNotFoundError: [Errno 2] No such file or directory:

前端 未结 2 1434
南旧
南旧 2020-12-03 14:21

I\'m trying to export my .py script to .exe using PyInstaller, which has dependencies on .ui files which were created using Qt Designer.

I can confirm that my .p

2条回答
  •  佛祖请我去吃肉
    2020-12-03 15:09

    You can simply use:

    uic.loadUi(r'E:\Development\Python\your_ui.ui', self)
    

    Use the full path, and use pyinstaller with standard arguments, and it works fine. The r prefix makes sure the backslashes are interpreted literally.

提交回复
热议问题