Kivy错误无法在Windows 10上的python 3.6.4中找到任何有价值的Window提供程序

时间:2018-04-20 23:42:38

标签: python windows python-3.x kivy

在Windows 10上的anaconda python 3.6.4中执行一个简单的kivy片段时,我得到一个kivy错误'无法找到任何有价值的Window提供程序'。知道如何解决问题吗?做一个pip安装docutils pygments pypiwin32 kivy.deps.sdl2并没有解决问题。

以下是来源:

from kivy.app import App
from kivy.core.window import Window


class WindowFileDropExampleApp(App):
    def build(self):
        Window.bind(on_dropfile=self._on_file_drop)
        return
    def _on_file_drop(self, window, file_path):
        print(file_path)
        return

if __name__ == '__main__':
    WindowFileDropExampleApp().run()

这是ouptut:

PS D:\Development\Python\explore> python dragdroplabel.py
[INFO   ] [Logger      ] Record log in C:\Users\Jean-Pierre\.kivy\logs\kivy_18-04-20_47.txt
[INFO   ] [Kivy        ] v1.10.0
[INFO   ] [Python      ] v3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)]
[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 <thread> for socket
[INFO   ] [Window      ] Provider: sdl2
[CRITICAL] [Window      ] Unable to find any valuable Window provider.
sdl2 - ImportError: DLL load failed: Le module spécifié est introuvable.
  File "C:\ProgramData\Anaconda3\lib\site-packages\kivy\core\__init__.py", line 67, in core_select_lib
    cls = cls()
  File "C:\ProgramData\Anaconda3\lib\site-packages\kivy\core\window\window_sdl2.py", line 140, in __init__
    super(WindowSDL, self).__init__()
  File "C:\ProgramData\Anaconda3\lib\site-packages\kivy\core\window\__init__.py", line 899, in __init__
    self.create_window()
  File "C:\ProgramData\Anaconda3\lib\site-packages\kivy\core\window\window_sdl2.py", line 269, in create_window
    self.fullscreen, resizable, state)
  File "kivy\core\window\_window_sdl2.pyx", line 110, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (kivy\core/window\_window_sdl2.c:2466)
  File "kivy\graphics\cgl.pyx", line 52, in kivy.graphics.cgl.cgl_get_backend_name (kivy\graphics\cgl.c:3044)
  File "kivy\graphics\cgl.pyx", line 60, in kivy.graphics.cgl.cgl_get_backend_name (kivy\graphics\cgl.c:2879)
  File "C:\ProgramData\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 922, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

[CRITICAL] [App         ] Unable to get a Window, abort.

0 个答案:

没有答案