1. <small id='JIBfA'></small><noframes id='JIBfA'>

      <i id='JIBfA'><tr id='JIBfA'><dt id='JIBfA'><q id='JIBfA'><span id='JIBfA'><b id='JIBfA'><form id='JIBfA'><ins id='JIBfA'></ins><ul id='JIBfA'></ul><sub id='JIBfA'></sub></form><legend id='JIBfA'></legend><bdo id='JIBfA'><pre id='JIBfA'><center id='JIBfA'></center></pre></bdo></b><th id='JIBfA'></th></span></q></dt></tr></i><div id='JIBfA'><tfoot id='JIBfA'></tfoot><dl id='JIBfA'><fieldset id='JIBfA'></fieldset></dl></div>
        <bdo id='JIBfA'></bdo><ul id='JIBfA'></ul>
    2. <tfoot id='JIBfA'></tfoot>
    3. <legend id='JIBfA'><style id='JIBfA'><dir id='JIBfA'><q id='JIBfA'></q></dir></style></legend>

      1. 无法为 pyqt5 gui 应用程序执行脚本 fbs_pyinstaller_

        时间:2023-08-04
              <bdo id='SVhvJ'></bdo><ul id='SVhvJ'></ul>

                <i id='SVhvJ'><tr id='SVhvJ'><dt id='SVhvJ'><q id='SVhvJ'><span id='SVhvJ'><b id='SVhvJ'><form id='SVhvJ'><ins id='SVhvJ'></ins><ul id='SVhvJ'></ul><sub id='SVhvJ'></sub></form><legend id='SVhvJ'></legend><bdo id='SVhvJ'><pre id='SVhvJ'><center id='SVhvJ'></center></pre></bdo></b><th id='SVhvJ'></th></span></q></dt></tr></i><div id='SVhvJ'><tfoot id='SVhvJ'></tfoot><dl id='SVhvJ'><fieldset id='SVhvJ'></fieldset></dl></div>
              • <small id='SVhvJ'></small><noframes id='SVhvJ'>

                  <tbody id='SVhvJ'></tbody>

                  <legend id='SVhvJ'><style id='SVhvJ'><dir id='SVhvJ'><q id='SVhvJ'></q></dir></style></legend>
                1. <tfoot id='SVhvJ'></tfoot>

                  本文介绍了无法为 pyqt5 gui 应用程序执行脚本 fbs_pyinstaller_hook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试为 Windows 构建我的 python pyqt5 gui 应用程序,运行后:

                  I'm trying to build my python pyqt5 gui application for windows, after running:

                  fbs startproject
                  
                  fbs freeze
                  

                  使用 pyinstaller 我也得到相同的结果这是我的规范文件:

                  using pyinstaller I get also the same results this is my spec file:

                  # -*- mode: python ; coding: utf-8 -*-
                  
                  block_cipher = None
                  
                  added_files = [
                                 ('C:\Users\Jared\Documents\Python Scripts\Bits App\bitsapp37\Lib\site-packages\PyQt5\Qt\bin\Qt5Core.dll', '.'),
                                 ('C:\Users\Jared\Documents\Python Scripts\Bits App\bitsapp37\Lib\site-packages\PyQt5\Qt\bin\Qt5Gui.dll', '.'),
                                 ('C:\Users\Jared\Documents\Python Scripts\Bits App\bitsapp37\Lib\site-packages\PyQt5\Qt\bin\Qt5Widgets.dll', '.')
                                ]
                  a = Analysis(['C:\Users\Jared\Documents\Python Scripts\Bits App\main.py'],
                               pathex=['C:\Users\Jared\Documents\Python Scripts\Bits App\bitsapp37\Lib\site-packages\PyQt5\Qt\bin'],
                               binaries=[],
                               datas=[
                                  ('C:\Users\Jared\Documents\Python Scripts\Bits App\add.png', '.'),
                                  ('C:\Users\Jared\Documents\Python Scripts\Bits App\contact.png', '.'),
                                  ('C:\Users\Jared\Documents\Python Scripts\Bits App\config.png', '.'),
                                  ('C:\Users\Jared\Documents\Python Scripts\Bits App\import.png', '.'),
                                  ('C:\Users\Jared\Documents\Python Scripts\Bits App\settings.png', '.'),
                                  ('C:\Users\Jared\Documents\Python Scripts\Bits App\exit.png', '.'),
                                  ('C:\Users\Jared\Documents\Python Scripts\Bits App\delete.png', '.'),
                                  ('C:\Users\Jared\Documents\Python Scripts\Bits App\export.png', '.'),
                                  ('C:\Users\Jared\Documents\Python Scripts\Bits App\help.png', '.'),
                               ],
                               hiddenimports=[],
                               hookspath=['c:\users\jared\docume~1\python~1\bitsap~1\bitsap~1\lib\site-packages\fbs\freeze\hooks'],
                               runtime_hooks=['C:\Users\Jared\Documents\Python Scripts\Bits App\target\PyInstaller\fbs_pyinstaller_hook.py'],
                               excludes=[],
                               win_no_prefer_redirects=False,
                               win_private_assemblies=False,
                               cipher=block_cipher,
                               noarchive=False)
                  pyz = PYZ(a.pure, a.zipped_data,
                               cipher=block_cipher)
                  exe = EXE(pyz,
                            a.scripts,
                            [],
                            exclude_binaries=True,
                            name='main',
                            debug=False,
                            bootloader_ignore_signals=False,
                            strip=False,
                            upx=False,
                            console=True , 
                            icon='C:\Users\Jared\Documents\Python Scripts\Bits App\icon5.ico')
                  coll = COLLECT(exe,
                                 a.binaries,
                                 a.zipfiles,
                                 a.datas,
                                 strip=False,
                                 upx=False,
                                 upx_exclude=[],
                                 name='main')
                  

                  然后尝试运行目标文件夹中的可执行文件,我收到此错误:

                  then trying to run the executable file in target folder, I get this error:

                  有谁知道如何解决这个问题,或者可能是什么原因造成的?

                  Does anyone know how to fix this, or what might be causing it?

                  如果它有助于我使用 python 3.7

                  If it helps im using python 3.7

                  我尝试了 python 3.6 并重新安装了所有内容,但仍然出现相同的错误.

                  I tried python 3.6 and reinstalling everything, still getting the same error.

                  编辑 2:错误日志:

                  Traceback (most recent call last):
                    File "targetPyInstallerfbs_pyinstaller_hook.py", line 2, in <module>
                    File "importlib\__init__.py", line 126, in import_module
                    File "<frozen importlib._bootstrap>", line 978, in _gcd_import
                    File "<frozen importlib._bootstrap>", line 961, in _find_and_load
                    File "<frozen importlib._bootstrap>", line 936, in _find_and_load_unlocked
                    File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
                    File "<frozen importlib._bootstrap>", line 978, in _gcd_import
                    File "<frozen importlib._bootstrap>", line 961, in _find_and_load
                    File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked
                  ModuleNotFoundError: No module named 'fbs_runtime'
                  [16452] Failed to execute script fbs_pyinstaller_hook
                  

                  推荐答案

                  我发现了问题,或者好像是问题,显然pyinstaller没有一路安装,看github的时候发现pyinstaller-我安装的钩子,然后它工作了,所以一定要:

                  I figured out the issue, or it seems to be the issue, apparently pyinstaller didnt install all the way, when I looked at the github, I noticed pyinstaller-hooks which is what I installed, then it worked, so be sure to:

                  pip install pyinstaller-hooks
                  

                  我希望这会有所帮助!

                  这篇关于无法为 pyqt5 gui 应用程序执行脚本 fbs_pyinstaller_hook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:为什么 QTableView 有空白边距,我该如何删除它们 下一篇:在按钮按下的滚动区域中加载 QTableWidgets

                  相关文章

                  最新文章

                      <bdo id='KXlWO'></bdo><ul id='KXlWO'></ul>

                    <legend id='KXlWO'><style id='KXlWO'><dir id='KXlWO'><q id='KXlWO'></q></dir></style></legend>
                  1. <small id='KXlWO'></small><noframes id='KXlWO'>

                    <tfoot id='KXlWO'></tfoot>
                    <i id='KXlWO'><tr id='KXlWO'><dt id='KXlWO'><q id='KXlWO'><span id='KXlWO'><b id='KXlWO'><form id='KXlWO'><ins id='KXlWO'></ins><ul id='KXlWO'></ul><sub id='KXlWO'></sub></form><legend id='KXlWO'></legend><bdo id='KXlWO'><pre id='KXlWO'><center id='KXlWO'></center></pre></bdo></b><th id='KXlWO'></th></span></q></dt></tr></i><div id='KXlWO'><tfoot id='KXlWO'></tfoot><dl id='KXlWO'><fieldset id='KXlWO'></fieldset></dl></div>