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

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

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

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

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

        时间:2023-06-06
      2. <i id='i7FmZ'><tr id='i7FmZ'><dt id='i7FmZ'><q id='i7FmZ'><span id='i7FmZ'><b id='i7FmZ'><form id='i7FmZ'><ins id='i7FmZ'></ins><ul id='i7FmZ'></ul><sub id='i7FmZ'></sub></form><legend id='i7FmZ'></legend><bdo id='i7FmZ'><pre id='i7FmZ'><center id='i7FmZ'></center></pre></bdo></b><th id='i7FmZ'></th></span></q></dt></tr></i><div id='i7FmZ'><tfoot id='i7FmZ'></tfoot><dl id='i7FmZ'><fieldset id='i7FmZ'></fieldset></dl></div>
          <bdo id='i7FmZ'></bdo><ul id='i7FmZ'></ul>
          1. <small id='i7FmZ'></small><noframes id='i7FmZ'>

              <tbody id='i7FmZ'></tbody>
            <legend id='i7FmZ'><style id='i7FmZ'><dir id='i7FmZ'><q id='i7FmZ'></q></dir></style></legend>

                  <tfoot id='i7FmZ'></tfoot>

                • 本文介绍了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 - 试图跟踪导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文章

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

                    <small id='90EuY'></small><noframes id='90EuY'>

                    <tfoot id='90EuY'></tfoot>
                    • <bdo id='90EuY'></bdo><ul id='90EuY'></ul>
                      <legend id='90EuY'><style id='90EuY'><dir id='90EuY'><q id='90EuY'></q></dir></style></legend>