安装Kivy Designer时如何解决此错误?

时间:2019-02-02 15:05:15

标签: python python-3.x git windows-10 kivy

每次我尝试安装kivy Designer时都会出现错误,每当我修复一个错误时,我都会发现另一个错误,有人可以帮助我吗? 我按照该网站https://kivy-designer.readthedocs.io/en/latest/installation.html#id2上的说明进行操作,并下载了所需的所有先决条件 我写:     python -m designer

我收到以下错误:

[INFO   ] [Logger      ] Record log in C:\Users\Amr\.kivy\logs\kivy_19-02-02_14.txt
[INFO   ] [Kivy        ] v1.10.1
[INFO   ] [Python      ] v3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)]
[INFO   ] [Factory     ] 194 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] GLEW initialization succeeded
[INFO   ] [GL          ] Backend used <glew>
[INFO   ] [GL          ] OpenGL version <b'4.5.0 - Build 23.20.16.4973'>
[INFO   ] [GL          ] OpenGL vendor <b'Intel'>
[INFO   ] [GL          ] OpenGL renderer <b'Intel(R) HD Graphics 620'>
[INFO   ] [GL          ] OpenGL parsed version: 4, 5
[INFO   ] [GL          ] Shading version <b'4.50 - Build 23.20.16.4973'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <32>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Localization file loaded (C]\Users\Amr\.kivy\garden\garden.xpopup\xpopup.mo).
[INFO   ] [Clipboard   ] Provider: winctypes
 Traceback (most recent call last):
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\git\__init__.py", line 83, in <module>
     refresh()
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\git\__init__.py", line 73, in refresh
     if not Git.refresh(path=path):
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\git\cmd.py", line 290, in refresh
     raise ImportError(err)
 ImportError: Bad git executable.
 The git executable must be specified in one of the following ways:
     - be included in your $PATH
     - be set via $GIT_PYTHON_GIT_EXECUTABLE
     - explicitly set via git.refresh()

 All git commands will error until this is rectified.

 This initial warning can be silenced or aggravated in the future by setting the
 $GIT_PYTHON_REFRESH environment variable. Use one of the following values:
     - quiet|q|silence|s|none|n|0: for no warning or exception
     - warn|w|warning|1: for a printed warning
     - error|e|raise|r|2: for a raised exception

 Example:
     export GIT_PYTHON_REFRESH=quiet


 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
 "__main__", mod_spec)
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
 exec(code, run_globals)
   File "C:\Users\Amr\Downloads\kivy-designer-master\kivy-designer-master\designer\__main__.py", line 17, in <module>
 main()
   File "C:\Users\Amr\Downloads\kivy-designer-master\kivy-designer-master\designer\__main__.py", line 13, in main
 DesignerApp().run()
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\app.py", line 800, in run
 root = self.build()
   File "C:\Users\Amr\Downloads\kivy-designer-master\kivy-designer-master\designer\app.py", line 1738, in build
 self.root = Designer()
   File "C:\Users\Amr\Downloads\kivy-designer-master\kivy-designer-master\designer\app.py", line 207, in __init__
 super(Designer, self).__init__(**kwargs)
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\uix\floatlayout.py", line 65, in __init__
 super(FloatLayout, self).__init__(**kwargs)
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\uix\layout.py", line 76, in __init__
 super(Layout, self).__init__(**kwargs)
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\uix\widget.py", line 348, in __init__
 Builder.apply(self, ignored_consts=self._kwargs_applied_init)
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\lang\builder.py", line 469, in apply
 self._apply_rule(widget, rule, rule, ignored_consts=ignored_consts)
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\lang\builder.py", line 585, in _apply_rule
 self._apply_rule(child, crule, rootrule)
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\lang\builder.py", line 585, in _apply_rule
 self._apply_rule(child, crule, rootrule)
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\lang\builder.py", line 585, in _apply_rule
 self._apply_rule(child, crule, rootrule)
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\lang\builder.py", line 544, in _apply_rule
 cls = Factory_get(cname)
   File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\factory.py", line 142, in __getattr__
 level=0  # force absolute
   File "C:\Users\Amr\Downloads\kivy-designer-master\kivy-designer-master\designer\tools\git_integration.py", line 23, in <module>
 from git import GitCommandError, RemoteProgress, Repo
    File "C:\Users\Amr\AppData\Local\Programs\Python\Python37\lib\site-packages\git\__init__.py", line 85, in <module>
     raise ImportError('Failed to initialize: {0}'.format(exc))
 ImportError: Failed to initialize: Bad git executable.
The git executable must be specified in one of the following ways:
 - be included in your $PATH
 - be set via $GIT_PYTHON_GIT_EXECUTABLE
 - explicitly set via git.refresh()

 All git commands will error until this is rectified.

 This initial warning can be silenced or aggravated in the future by setting the
 $GIT_PYTHON_REFRESH environment variable. Use one of the following values:
     - quiet|q|silence|s|none|n|0: for no warning or exception
     - warn|w|warning|1: for a printed warning
     - error|e|raise|r|2: for a raised exception

 Example:
     export GIT_PYTHON_REFRESH=quiet

我运行64位Windows 10

如果有人能帮助我,我真的很感激

预先感谢

2 个答案:

答案 0 :(得分:1)

Kivy Designer已过时,不能真正使用,我们强烈建议您不要使用它。

答案 1 :(得分:0)

尝试将包含“ git.exe”的目录添加到PATH, 这是您应该如何做的https://www.computerhope.com/issues/ch000549.htm (您可能需要在添加PC之后重新启动PC,以使该进程获得新的PATH环境var)