<bdo id='SzEaI'></bdo><ul id='SzEaI'></ul>
    <tfoot id='SzEaI'></tfoot>

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

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

        <i id='SzEaI'><tr id='SzEaI'><dt id='SzEaI'><q id='SzEaI'><span id='SzEaI'><b id='SzEaI'><form id='SzEaI'><ins id='SzEaI'></ins><ul id='SzEaI'></ul><sub id='SzEaI'></sub></form><legend id='SzEaI'></legend><bdo id='SzEaI'><pre id='SzEaI'><center id='SzEaI'></center></pre></bdo></b><th id='SzEaI'></th></span></q></dt></tr></i><div id='SzEaI'><tfoot id='SzEaI'></tfoot><dl id='SzEaI'><fieldset id='SzEaI'></fieldset></dl></div>
      2. pyinstaller 因情节失败而失败

        pyinstaller fails with plotly(pyinstaller 因情节失败而失败)

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

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

            <tfoot id='jzRZr'></tfoot>
              <bdo id='jzRZr'></bdo><ul id='jzRZr'></ul>
                  <tbody id='jzRZr'></tbody>

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

                  本文介绍了pyinstaller 因情节失败而失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 pyinstaller 编译我当前的程序,它似乎无法处理所有必需的文件.它自己运行良好,无需情节它也可以编译和运行.

                  I am compiling my current program using pyinstaller and it seems to not be able to handle all required files in plotly. It runs fine on its own, and without plotly it can compile and run as well.

                  似乎无法找到我什至无法在驱动器上的任何位置找到的文件default-schema.json".

                  It seems be to failing to find a file "default-schema.json" that I cannot even locate anywhere on my drive.

                  Traceback(最近一次调用最后一次):文件comdty_runtime.py",行17,在文件"中,第 2237 行,在_find_and_load 文件",第 2226 行,在 _find_and_load_unlocked 文件"中,第 1191 行,在 _load_unlocked 文件"中,行1161,在 _load_backward_compatible 文件中"d:usersktehraniappdatalocalcontinuumanaconda3envspy34libsite-packagesPyInstallerloaderpyimod03_importers.py",第 389 行,在加载模块exec(bytecode, module.dict) 文件actual_vs_mai.py",第 12 行,在文件",第 2237 行,在_find_and_load 文件",第 2226 行,在 _find_and_load_unlocked 文件"中,第 1191 行,在 _load_unlocked 文件"中,行1161,在 _load_backward_compatible 文件中"d:usersktehraniappdatalocalcontinuumanaconda3envspy34libsite-packagesPyInstallerloaderpyimod03_importers.py",第 389 行,在加载模块exec(bytecode, module.dict) File "site-packagesplotly__init__.py",第 31 行,在 File"",第 2237 行,在 _find_and_load 文件中"",第 2226 行,在 _find_and_load_unlocked文件",第 1191 行,在 _load_unlocked
                  文件",第 1161 行,在_load_backward_compatible 文件d:users*appdatalocalcontinuumanaconda3envspy34libsite-packagesPyInstallerloaderpyimod03_importers.py",第 389 行,在加载模块exec(bytecode, module.dict) 文件site-packagesplotlygraph_objs__init__.py",第 14 行,在
                  文件",第 2237 行,在 _find_and_load
                  文件",第 2226 行,在_find_and_load_unlocked 文件",第 1191 行,在 _load_unlocked 文件",行1161,在 _load_backward_compatible 文件中"d:users*appdatalocalcontinuumanaconda3envspy34libsite-packagesPyInstallerloaderpyimod03_importers.py",第 389 行,在加载模块exec(bytecode, module.dict) 文件site-packagesplotlygraph_objsgraph_objs.py",第 34 行,在文件",第 2237 行,在 _find_and_load
                  文件",第 2226 行,在_find_and_load_unlocked 文件",第 1191 行,在 _load_unlocked 文件",行1161,在 _load_backward_compatible 文件中"d:users*appdatalocalcontinuumanaconda3envspy34libsite-packagesPyInstallerloaderpyimod03_importers.py",第 389 行,在加载模块exec(bytecode, module.dict) 文件site-packagesplotlygraph_reference.py",第 578 行,在
                  文件site-packagesplotlygraph_reference.py",第 70 行,在get_graph_reference 文件站点包setuptools-27.2.0-py3.4.eggpkg_resources__init__.py",第 1215 行,在 resource_string 文件中站点包setuptools-27.2.0-py3.4.eggpkg_resources__init__.py",第 1457 行,在 get_resource_string 文件中站点包setuptools-27.2.0-py3.4.eggpkg_resources__init__.py",第 1530 行,在 _get 文件中"d:users*appdatalocalcontinuumanaconda3envspy34libsite-packagesPyInstallerloaderpyimod03_importers.py",第 474 行,在获取数据使用 open(path, 'rb') as fp: FileNotFoundError: [Errno 2] No such file or directory: 'H:PythonCommodity_MAI_Trade_ListCodedistcomdty_runtimeplotlypackage_datadefault-schema.json' comdty_runtime 执行脚本失败

                  Traceback (most recent call last): File "comdty_runtime.py", line 17, in File "", line 2237, in _find_and_load File "", line 2226, in _find_and_load_unlocked File "", line 1191, in _load_unlocked File "", line 1161, in _load_backward_compatible File "d:usersktehraniappdatalocalcontinuumanaconda3envspy34libsite-p ackagesPyInstallerloaderpyimod03_importers.py", line 389, in load_module exec(bytecode, module.dict) File "actual_vs_mai.py", line 12, in File "", line 2237, in _find_and_load File "", line 2226, in _find_and_load_unlocked File "", line 1191, in _load_unlocked File "", line 1161, in _load_backward_compatible File "d:usersktehraniappdatalocalcontinuumanaconda3envspy34libsite-p ackagesPyInstallerloaderpyimod03_importers.py", line 389, in load_module exec(bytecode, module.dict) File "site-packagesplotly__init__.py", line 31, in File "", line 2237, in _find_and_load File "", line 2226, in _find_and_load_unlocked File "", line 1191, in _load_unlocked
                  File "", line 1161, in _load_backward_compatible File "d:users*appdatalocalcontinuumanaconda3envspy34libsite-p ackagesPyInstallerloaderpyimod03_importers.py", line 389, in load_module exec(bytecode, module.dict) File "site-packagesplotlygraph_objs__init__.py", line 14, in
                  File "", line 2237, in _find_and_load
                  File "", line 2226, in _find_and_load_unlocked File "", line 1191, in _load_unlocked File "", line 1161, in _load_backward_compatible File "d:users*appdatalocalcontinuumanaconda3envspy34libsite-p ackagesPyInstallerloaderpyimod03_importers.py", line 389, in load_module exec(bytecode, module.dict) File "site-packagesplotlygraph_objsgraph_objs.py", line 34, in File "", line 2237, in _find_and_load
                  File "", line 2226, in _find_and_load_unlocked File "", line 1191, in _load_unlocked File "", line 1161, in _load_backward_compatible File "d:users*appdatalocalcontinuumanaconda3envspy34libsite-p ackagesPyInstallerloaderpyimod03_importers.py", line 389, in load_module exec(bytecode, module.dict) File "site-packagesplotlygraph_reference.py", line 578, in
                  File "site-packagesplotlygraph_reference.py", line 70, in get_graph_referenc e File "site-packagessetuptools-27.2.0-py3.4.eggpkg_resources__init__.py", li ne 1215, in resource_string File "site-packagessetuptools-27.2.0-py3.4.eggpkg_resources__init__.py", li ne 1457, in get_resource_string File "site-packagessetuptools-27.2.0-py3.4.eggpkg_resources__init__.py", li ne 1530, in _get File "d:users*appdatalocalcontinuumanaconda3envspy34libsite-p ackagesPyInstallerloaderpyimod03_importers.py", line 474, in get_data with open(path, 'rb') as fp: FileNotFoundError: [Errno 2] No such file or directory: 'H:PythonCommodity_M AI_Trade_ListCodedistcomdty_runtimeplotlypackage_datadefault-schema. json' Failed to execute script comdty_runtime

                  推荐答案

                  我遇到了同样的问题,并通过 pyinstaller 文档找到了解决办法:

                  I came across the same problem, and worked my way through the pyinstaller documentation to find out what to do:

                  pyinstaller 会创建一个与您的 .py 文件同名的 .spec 文件.在a = Analysis下,你会发现datas = []

                  pyinstaller creates a .spec file with the same name as your .py file. under a = Analysis, you will find datas = []

                  a = Analysis(['graphic_interface.py'],
                               pathex=[xxx],
                               binaries=[],
                               datas=[],
                               hiddenimports=[],
                               hookspath=[],
                               runtime_hooks=[],
                               excludes=[],
                               win_no_prefer_redirects=False,
                               win_private_assemblies=False,
                               cipher=block_cipher,
                               noarchive=False)
                  

                  在那里你添加了 plotly 的路径.相对路径对我不起作用,所以我设置了一个绝对路径

                  there you add the path for plotly. a relative path didn't work for me, so I set an absolute path

                  datas=[('C:\Users\Me\PycharmProjects\Project\venv\Lib\site-packages\plotly\', 'plotly')],
                  

                  现在你必须在运行 pyinstaller 时使用 spec 文件

                  now you have to use the spec file when running pyinstaller

                  pyinstaller myproject.spec myproject.py
                  

                  您无需担心其他命令,例如 oneFile 等,因为它们已经保存在 .spec 文件中

                  you dont need to worry about other commands like oneFile etc, because they are already saved in the .spec file

                  这篇关于pyinstaller 因情节失败而失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Adding config modes to Plotly.Py offline - modebar(将配置模式添加到 Plotly.Py 离线 - 模式栏)
                  Plotly: How to style a plotly figure so that it doesn#39;t display gaps for missing dates?(Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙?)
                  python save plotly plot to local file and insert into html(python将绘图保存到本地文件并插入到html中)
                  Plotly: What color cycle does plotly express follow?(情节:情节表达遵循什么颜色循环?)
                  How to save plotly express plot into a html or static image file?(如何将情节表达图保存到 html 或静态图像文件中?)
                  Plotly: How to make a line plot from a pandas dataframe with a long or wide format?(Plotly:如何使用长格式或宽格式的 pandas 数据框制作线图?)

                    <tbody id='Co5bb'></tbody>
                2. <legend id='Co5bb'><style id='Co5bb'><dir id='Co5bb'><q id='Co5bb'></q></dir></style></legend>
                  • <bdo id='Co5bb'></bdo><ul id='Co5bb'></ul>
                    • <tfoot id='Co5bb'></tfoot>

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

                          • <small id='Co5bb'></small><noframes id='Co5bb'>