问题
I'm using a kivy over pycharm. I want to install a kivy designer to take advantage of Kivy's visual interface features. I installed the kivydesigner as written in the document with python3 but when I run it, I get an error like the following below ; the popup comes on the screen and closes immediately.
Thank you in advance for your help.
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ü)
Last line is Turkish. It means "Crushing failure (core breakdown)".
回答1:
Note
The Kivy Designer is still a WIP (Work In Progress).
Python 3.x, Kivy, Ubuntu 16.04/18.04 LTS (64-bits) - Crash
Problem running Kivy Designer on Ubuntu 16.04 LTS and it always crash.
Python 3.x, Kivy, Windows 10 (64-bits) - Working
No problem running in on Windows 10 64-bits using Python 3.x.
Solution for FileNotFoundError
There is a file by the name, xpopup_ru.mo
in the folder, .kivy/garden/garden.xpopup
. Rename xpopup_ru.mo
to xpopup.mo
, and it will solve the FileNotFoundError but Kivy Designer will still crash in the environment: Python 3.x, Kivy, Ubuntu 16.04/18.04 LTS (64-bits).
Python2.x, Kivy, Ubuntu 16.04/18.04 LTS (64-bits) - Working
No problem running Kivy Designer
Output
回答2:
I just moved the '__main__.py' to its parent folder and made below modifications after renaming the mo file to xpopup.mo:
import os
os.environ['GIT_PYTHON_REFRESH'] = 'quiet'
data = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'designer\data')
you can simply run this .py file from your IDE to launch the Kivy Designer.
来源:https://stackoverflow.com/questions/46495860/kivy-designer-is-not-working