问题描述
限时送ChatGPT账号..大家下午好.
再次尝试在 WINDOWS 10 上为 DESKTOP 打包 kivy,但无济于事!
Once again trying to package kivy for DESKTOP on WINDOWS 10 and to no avail!
我有很多错误,我设法在不影响小组秩序的情况下解决了,但这个错误是带有 ph 的 phoda.
I had a lot of errors that I managed to solve without disturbing the order in the groups but this one is phoda with ph.
1 - 我使用 Auto_py_to_exe 创建了 exe,在没有任何评论说我应该使用 pyinstaller 之前,我告诉你,同样的事情发生了!
1 - I create the exe using Auto_py_to_exe and before there is any comment that I should use pyinstaller, I tell you, the same thing happens!
2 - 我的 pyinstaller 脚本如下:
2 - My pyinstaller script is as follows:
pyinstaller --noconfirm --onefile --console --name "TeuCu";--add-data "C:/Users/Elias/Desktop/kv_inventario/inventario/main.kv;."--add-data "C:/Users/Elias/桌面/kv_inventario/inventario/images;图像/"C:/Users/Elias/Desktop/kv_inventario/inventario/main.py"
pyinstaller --noconfirm --onefile --console --name "TeuCu" --add-data "C: /Users/Elias/Desktop/kv_inventario/inventario/main.kv ;." --add-data "C: / Users / Elias / Desktop / kv_inventario / inventario / images; images /" "C: /Users/Elias/Desktop/kv_inventario/inventario/main.py"
3 - 错误正是如此,当应用程序创建后运行时,它返回此错误:
3 - The error is exactly like this, when running the application after it is created it returns this error:
[CRITICAL] [Window] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - Exception: SDL2: Unable to load image
File "kivy\core\__init__.py", line 70, in core_select_lib
File "kivy\core\window\window_sdl2.py", line 152, in __init__
File "kivy\core\window\__init__.py", line 982, in __init__
File "kivy\core\window\window_sdl2.py", line 311, in create_window
File "kivy\core\window\__init__.py", line 1268, in create_window
File "kivy\graphics\instructions.pyx", line 783, in kivy.graphics.instructions.RenderContext.__init__
File "kivy\core\image\__init__.py", line 561, in __init__
File "kivy\core\image\__init__.py", line 754, in _set_filename
File "kivy\core\image\__init__.py", line 460, in load
File "kivy\core\image\__init__.py", line 223, in __init__
File "kivy\core\image\img_sdl2.py", line 47, in load
[CRITICAL] [App] Unable to get a Window, abort.
我在 kivy 问题中发现的这个可能可行的解决方案是:Kivy 问题
My solution that could possibly work would be this tip that I found in kivy issues: Kivy issues
这把我带到下面的帖子并翻译它要求卸载枕头并重新安装轮子
This took me to the post below and translating it asks to uninstall the pillow and reinstall with the wheel
python3 -m pip3 uninstall pillow
python3 -m pip3 install --use-wheel pillow
但它没有.
我需要你的帮助.谁设法使用 kivy 为 Windows 生成应用程序
I would like your help. Who managed to generate an application for Windows with kivy
我正在使用 Windows 10 进行打包.
I'm using Windows 10 to package.
推荐答案
此错误很常见 - 以下是一些有用的链接:
This error is common - Here are some helpful links:
Kivy 不工作(错误:无法寻找任何有价值的 Window 提供者.)
Python 应用程序无法正常工作使用 pyinstaller 但没有给出任何错误
https://github/kivy/kivy/issues/6342
https://github/pal1000/save-legacy-intel-graphics
Kivy 未检测到 OpenGL 2.0Windows-Pyinstaller 错误无法执行脚本"当应用被点击时
无法获取窗口,中止
https://pyinstaller.readthedocs.io/en/stable/when-things-go-wrong.html
https://github/kivy/kivy/issues/6276
如果这些都不起作用,我还制作了一个关于将 kivy 应用程序打包到 Windows 的单个 exe 的视频:https://www.youtube/watch?v=k9Hx0q5Sopg
If none of these work, I also made a video on packaging a kivy app to a single exe for Windows: https://www.youtube/watch?v=k9Hx0q5Sopg
如果你成功了,请告诉我.干杯!
Please let me know if you succeed. Cheers!
这篇关于如何在 Windows 中为桌面创建 kivy 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论