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

    2. <legend id='bUagX'><style id='bUagX'><dir id='bUagX'><q id='bUagX'></q></dir></style></legend>
        • <bdo id='bUagX'></bdo><ul id='bUagX'></ul>

        Pyinstaller:警告:找不到库

        Pyinstaller: WARNING: lib not found(Pyinstaller:警告:找不到库)
        • <tfoot id='9WBDY'></tfoot>

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

                <legend id='9WBDY'><style id='9WBDY'><dir id='9WBDY'><q id='9WBDY'></q></dir></style></legend>
                    <tbody id='9WBDY'></tbody>

                  本文介绍了Pyinstaller:警告:找不到库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试从我的代码中创建一个使用 PyQt5 的可执行文件.我正在使用 Python 3.5.3 -64 位,在 Windows 10 中开发,使用 pip 安装 pyinstaller 3.2.1,并安装了 pywin32.Pyinstaller 运行但输出未找到库的警告.

                  I'm trying create an executable from my code that uses PyQt5. I'm using Python 3.5.3 -64 bits, developing in Windows 10, used pip to install pyinstaller 3.2.1, and installed pywin32. Pyinstaller runs but outputs warnings that libraries aren't found.

                  我正在使用以下内容创建我的应用程序:

                  I'm creating my application using the following:

                  pyinstaller Start_UI.py
                  

                  输出这些警告.

                  pyinstaller Start_UI.spec
                  

                  哪些输出这些警告

                  当我打开 pyinstaller 创建的可执行文件时,应用程序会立即关闭.我怀疑应用程序由于警告而失败.如何解决警告以使可执行文件正常工作?

                  When I open the executable that pyinstaller creates, the application closes immediately. I suspect the application is failing because of the warnings. How can I resolve the warnings so the executable works?

                  感谢您的回复.

                  我在我的计算机上搜索 DLL 文件并将它们复制到 dist 文件夹中,该文件夹通过以下方式解决了警告输出:

                  I searched for DLL files on my computer and copied them into the dist folder which resolved the warnings output by:

                  pyinstaller Start_UI.py
                  

                  至于:

                  pyinstaller Start_UI.spec
                  

                  我在我的 Windows SDK 安装中找到了任务 api-mis-win-crt-* dll 文件,并将它们也复制到了 dist 中.这一次,警告没有得到解决,因为 pyinstaller 找不到 dll 文件.我需要将 api dll 文件放在哪里以便 pyinstaller 找到它们?

                  I located the mission api-mis-win-crt-* dll files in my installation of Windows SDK, and copied them into dist as well. This time, the warnings were not resolved as pyinstaller can't locate the dll files. Where do I need to put the api dll files for pyinstaller to locate them?

                  推荐答案

                  经过大量研究,问题出在 Windows 10 上.虽然我没有找到 Windows 10 解决方案,但我确实在 Windows 7 中解决了我的问题.

                  After a lot of research, the problem is because of Windows 10. While I didn't find a Windows 10 solution, I did solve my problem in Windows 7.

                  我在 Windows 7 上测试了 pyinstaller,但仍然收到警告,但不是 api-ms-win-crt-*.dll 警告.

                  I tested pyinstaller on Windows 7 and was still getting warnings, but not the api-ms-win-crt-*.dll warnings.

                  我将 Python35 目录中的所有 dll 文件复制到 pyinstaller 生成的 dist 文件夹中.至此,pyinstaller 可以将 Hello World 程序无错误地转为可执行文件:

                  I copied all the dll files in my Python35 directory into the pyinstaller generated dist folder. At this point, pyinstaller can turn a Hello World program into an executable without errors:

                  pyinstaller --onefile Hello_World.py
                  

                  但是,将 PyQt5 程序转换为可执行文件会出错,因为 pyinstaller 无法找到 Qt5*.dll 文件.要修复此问题,请将 Lib/site-packages/PyQt5/Qt/bin 下的 PyQt5、Qt5*.dll 文件复制到 dist.然后告诉 pyinstaller dll 文件在哪里使用 --path:

                  However, turning a PyQt5 program into an executable gives errors because pyinstaller can't locate the Qt5*.dll files. To fix this copy the PyQt5, Qt5*.dll files, under Lib/site-packages/PyQt5/Qt/bin and into dist. Then tell pyinstaller where the dll files are using --path:

                  pyinstaller --onefile --path dist Start_UI.py
                  

                  这会在 dist 中创建一个可以工作的可执行 Start_UI.exe.

                  This creates a working executable Start_UI.exe in dist.

                  这篇关于Pyinstaller:警告:找不到库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Kivy 1.9.0 Windows package KeyError: #39;rthooks#39;(Kivy 1.9.0 Windows 包 KeyError: rthooks)
                  Python Kivy: how to call a function on button click?(Python Kivy:如何在按钮单击时调用函数?)
                  How to disable a widget in Kivy?(如何禁用 Kivy 中的小部件?)
                  Centering an object in Kivy(在 Kivy 中将对象居中)
                  How to downgrade to Python 3.4 from 3.5(如何从 Python 3.5 降级到 Python 3.4)
                  Change button or label text color in kivy(在kivy中更改按钮或标签文本颜色)
                  • <tfoot id='sydjA'></tfoot>
                    <i id='sydjA'><tr id='sydjA'><dt id='sydjA'><q id='sydjA'><span id='sydjA'><b id='sydjA'><form id='sydjA'><ins id='sydjA'></ins><ul id='sydjA'></ul><sub id='sydjA'></sub></form><legend id='sydjA'></legend><bdo id='sydjA'><pre id='sydjA'><center id='sydjA'></center></pre></bdo></b><th id='sydjA'></th></span></q></dt></tr></i><div id='sydjA'><tfoot id='sydjA'></tfoot><dl id='sydjA'><fieldset id='sydjA'></fieldset></dl></div>

                      <tbody id='sydjA'></tbody>

                        <legend id='sydjA'><style id='sydjA'><dir id='sydjA'><q id='sydjA'></q></dir></style></legend>
                            <bdo id='sydjA'></bdo><ul id='sydjA'></ul>

                            <small id='sydjA'></small><noframes id='sydjA'>