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

        <tfoot id='P6zoj'></tfoot>

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

        • <bdo id='P6zoj'></bdo><ul id='P6zoj'></ul>

        <legend id='P6zoj'><style id='P6zoj'><dir id='P6zoj'><q id='P6zoj'></q></dir></style></legend>

        PyInstaller 中的 Kivy Garden - 试图跟踪导入

        时间:2023-10-08
          <tbody id='BCAFz'></tbody>

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

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

              • <bdo id='BCAFz'></bdo><ul id='BCAFz'></ul>
                  本文介绍了PyInstaller 中的 Kivy Garden - 试图跟踪导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试构建一个基于 Kivy 的 Python 项目.它通过导入使用来自 Kivy Garden 的 NavigationDrawer 组件:

                  I have a Kivy-based Python project that I'm trying to build. It uses the NavigationDrawer component from Kivy Garden, through an import:

                  从 kivy.garden.navigationdrawer 导入 NavigationDrawer

                  from kivy.garden.navigationdrawer import NavigationDrawer

                  我有一个用于构建可分发版本的 PyInstaller 规范文件.这个版本在我的机器上运行良好,但不幸的是在其他机器上不行.使用 -v 开关在dist"版本中运行解释器,似乎当我在我的机器上运行可分发文件时,navigationdrawer 组件实际上并不是来自我的构建文件夹.所有其他导入显示如下:

                  I have a PyInstaller spec file for it which builds a distributable version. This version works well on my machine, but unfortunately not on other machines. Running the interpreter in the 'dist' version with the -v switch, it appears that when I run the distributable on my machine, the navigationdrawer component is not actually coming from inside my build folder. All the other imports show something like:

                  import kivy.graphics.gl_instructions # 从 C:UsersmemyappdistRACECA~1kivy.graphics.gl_instructions.pyd 动态加载

                  import kivy.graphics.gl_instructions # dynamically loaded from C:UsersmemyappdistRACECA~1kivy.graphics.gl_instructions.pyd

                  但是 navigationdrawer 导入说:

                  But the navigationdrawer import says:

                  导入 kivy.garden.navigationdrawer

                  import kivy.garden.navigationdrawer

                  """目录 C:Usersme.kivygardengarden.navigationdrawerC:Usersme.kivygardengarden.navigationdrawer\__init__.pyc 匹配 C:Usersme.kivygardengarden.navigationdrawer\__init__.pyimport kivy.garden.navigationdrawer # 预编译自 C:Usersme.kivygardengarden.navigationdrawer\__init__.pyc"""

                  """directory C:Usersme.kivygardengarden.navigationdrawer C:Usersme.kivygardengarden.navigationdrawer\__init__.pyc matches C:Usersme.kivygardengarden.navigationdrawer\__init__.py import kivy.garden.navigationdrawer # precompiled from C:Usersme.kivygardengarden.navigationdrawer\__init__.pyc"""

                  但是不!我不希望您从 c:users 导入它们.我希望它们像所有其他导入一样被很好地复制到我的 dist 文件夹中.我尝试将 c:usersme 添加到 PyInstaller 的 pathex、系统 PATH 和 PYTHONPATH 中,但没有任何乐趣.有人有什么想法吗?

                  But noo! I don't want you to import them from c:users. I want them to get nicely copied into my dist folder like all the other imports. I've tried adding c:usersme to PyInstaller's pathex, the system PATH and PYTHONPATH without any joy. Anyone have any ideas?

                  推荐答案

                  尝试将您的 garden 包安装到您的应用中.即

                  Try installing your garden packages into your app. i.e.

                  garden install --app navigationdrawer
                  

                  这将在当前目录中创建一个 libs/garden 文件夹,并将 garden 包放入其中,这应该更容易包含.

                  This will create a libs/garden folder inside the current directory and place the garden packages in there, which should make it easier to include.

                  这篇关于PyInstaller 中的 Kivy Garden - 试图跟踪导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:小部件在 GridLayout 中的位置 下一篇:在 kivy 中嵌套小部件

                  相关文章

                  最新文章

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

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

                      <tfoot id='X9N8q'></tfoot>