Kivy 设计师不工作
Kivy-designer is not working
我在 pycharm 上使用 kivy。我想安装一个 kivy 设计器来利用 Kivy 的可视化界面特性。我按照 python3 文档中的说明安装了 kivydesigner,但是当我 运行 它时,出现如下错误;弹出窗口出现在屏幕上并立即关闭。
预先感谢您的帮助。
stranger@paradise-citys-grasses:~/kivy-designer$ python3 -m designer
[INFO ] [Logger ] Record log in /home/stranger/.kivy/logs/kivy_17-09-29_72.txt
[INFO ] [Kivy ] v1.10.0
[INFO ] [Python ] v3.5.3 (default, Sep 14 2017, 22:58:41)
[GCC 6.3.0 20170406]
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [OSC ] using <multiprocessing> for socket
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] Backend used <gl>
[INFO ] [GL ] OpenGL version <b'3.0 Mesa 17.0.7'>
[INFO ] [GL ] OpenGL vendor <b'X.Org'>
[INFO ] [GL ] OpenGL renderer <b'Gallium 0.4 on AMD CEDAR (DRM 2.49.0 / 4.10.0-35-generic, LLVM 4.0.0)'>
[INFO ] [GL ] OpenGL parsed version: 3, 0
[INFO ] [GL ] Shading version <b'1.30'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[WARNING] [FileNotFoundError] [Errno 2] No such file or directory: '/home/stranger/.kivy/garden/garden.xpopup/xpopup.mo'. Switch to the defaults.
[INFO ] [Clipboard ] Provider: gtk3(['clipboard_dbusklipper'] ignored)
xclip version 0.12
Copyright (C) 2001-2008 Kim Saunders et al.
Distributed under the terms of the GNU GPL
[INFO ] [Cutbuffer ] Provider: xclip
[INFO ] [CutBuffer ] cut buffer support enabled
Parçalama arızası (çekirdek döküldü)
最后一行是土耳其语。意思是"Crushing failure (core breakdown)"。
备注
Kivy Designer 仍处于 WIP(进行中)。
Python 3.x,Kivy,Ubuntu 16.04/18.04 LTS(64 位)- 崩溃
运行 Ubuntu 16.04 LTS 上的 Kivy Designer 问题,它总是崩溃。
Python 3.x,Kivy,Windows 10(64 位)- 工作
没问题 运行 在 Windows 10 64 位使用 Python 3.x.
FileNotFoundError 的解决方法
文件夹 .kivy/garden/garden.xpopup
中有一个名为 xpopup_ru.mo
的文件。将 xpopup_ru.mo
重命名为 xpopup.mo
,会解决 FileNotFoundError 但 Kivy Designer 仍然会在环境中崩溃:Python 3.x, Kivy, Ubuntu 16.04/18.04 LTS(64 位)。
Python2.x,Kivy,Ubuntu 16.04/18.04 LTS(64 位)- 工作
没问题运行 Kivy Designer
输出
我刚刚将“__main__.py”移动到其父文件夹,并在将 mo 文件重命名为 xpopup.mo 后进行了以下修改:
import os
os.environ['GIT_PYTHON_REFRESH'] = 'quiet'
data = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'designer\data')
您只需 运行 您 IDE 中的这个 .py 文件即可启动 Kivy Designer。
我在 pycharm 上使用 kivy。我想安装一个 kivy 设计器来利用 Kivy 的可视化界面特性。我按照 python3 文档中的说明安装了 kivydesigner,但是当我 运行 它时,出现如下错误;弹出窗口出现在屏幕上并立即关闭。
预先感谢您的帮助。
stranger@paradise-citys-grasses:~/kivy-designer$ python3 -m designer
[INFO ] [Logger ] Record log in /home/stranger/.kivy/logs/kivy_17-09-29_72.txt
[INFO ] [Kivy ] v1.10.0
[INFO ] [Python ] v3.5.3 (default, Sep 14 2017, 22:58:41)
[GCC 6.3.0 20170406]
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [OSC ] using <multiprocessing> for socket
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] Backend used <gl>
[INFO ] [GL ] OpenGL version <b'3.0 Mesa 17.0.7'>
[INFO ] [GL ] OpenGL vendor <b'X.Org'>
[INFO ] [GL ] OpenGL renderer <b'Gallium 0.4 on AMD CEDAR (DRM 2.49.0 / 4.10.0-35-generic, LLVM 4.0.0)'>
[INFO ] [GL ] OpenGL parsed version: 3, 0
[INFO ] [GL ] Shading version <b'1.30'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[WARNING] [FileNotFoundError] [Errno 2] No such file or directory: '/home/stranger/.kivy/garden/garden.xpopup/xpopup.mo'. Switch to the defaults.
[INFO ] [Clipboard ] Provider: gtk3(['clipboard_dbusklipper'] ignored)
xclip version 0.12
Copyright (C) 2001-2008 Kim Saunders et al.
Distributed under the terms of the GNU GPL
[INFO ] [Cutbuffer ] Provider: xclip
[INFO ] [CutBuffer ] cut buffer support enabled
Parçalama arızası (çekirdek döküldü)
最后一行是土耳其语。意思是"Crushing failure (core breakdown)"。
备注
Kivy Designer 仍处于 WIP(进行中)。
Python 3.x,Kivy,Ubuntu 16.04/18.04 LTS(64 位)- 崩溃
运行 Ubuntu 16.04 LTS 上的 Kivy Designer 问题,它总是崩溃。
Python 3.x,Kivy,Windows 10(64 位)- 工作
没问题 运行 在 Windows 10 64 位使用 Python 3.x.
FileNotFoundError 的解决方法
文件夹 .kivy/garden/garden.xpopup
中有一个名为 xpopup_ru.mo
的文件。将 xpopup_ru.mo
重命名为 xpopup.mo
,会解决 FileNotFoundError 但 Kivy Designer 仍然会在环境中崩溃:Python 3.x, Kivy, Ubuntu 16.04/18.04 LTS(64 位)。
Python2.x,Kivy,Ubuntu 16.04/18.04 LTS(64 位)- 工作
没问题运行 Kivy Designer
输出
我刚刚将“__main__.py”移动到其父文件夹,并在将 mo 文件重命名为 xpopup.mo 后进行了以下修改:
import os
os.environ['GIT_PYTHON_REFRESH'] = 'quiet'
data = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'designer\data')
您只需 运行 您 IDE 中的这个 .py 文件即可启动 Kivy Designer。