2017-12-27 2 views
0

ich die folgenden Fehler, wenn eine Python-Datei mit Kivy auf eine neue Windows 10 ausgeführt wird:Kivy Fehler auf einen neuen Windows 10 (gleichen Code haben gut funktioniert auf einem alten Mac)

C:\Users\Me\AppData\Local\Programs\Python\Python36-32\python.exe C:/Users/Me/Desktop/PycharmProjects/music_game_kivy/music_game_kivy.py 
[INFO ] [Logger  ] Record log in C:\Users\Me\.kivy\logs\kivy_17-12-26_10.txt 
[INFO ] [Kivy  ] v1.10.0 
[INFO ] [Python  ] v3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] 
[INFO ] [Factory  ] 194 symbols loaded 
[INFO ] [Image  ] Providers: img_tex, img_dds, img_gif (img_sdl2, img_pil, img_ffpyplayer ignored) 
[CRITICAL] [Text  ] Unable to find any valuable Text provider. 
sdl2 - ImportError: DLL load failed: The specified module could not be found. 
    File "C:\Users\Me\AppData\Local\Programs\Python\Python36-32\lib\site-packages\kivy\core\__init__.py", line 59, in core_select_lib 
    fromlist=[modulename], level=0) 
    File "C:\Users\Me\AppData\Local\Programs\Python\Python36-32\lib\site-packages\kivy\core\text\text_sdl2.py", line 12, in <module> 
    from kivy.core.text._text_sdl2 import (_SurfaceContainer, _get_extents, 

pil - ModuleNotFoundError: No module named 'PIL' 
    File "C:\Users\Me\AppData\Local\Programs\Python\Python36-32\lib\site-packages\kivy\core\__init__.py", line 59, in core_select_lib 
    fromlist=[modulename], level=0) 
    File "C:\Users\Me\AppData\Local\Programs\Python\Python36-32\lib\site-packages\kivy\core\text\text_pil.py", line 7, in <module> 
    from PIL import Image, ImageFont, ImageDraw 

[CRITICAL] [App   ] Unable to get a Text provider, abort. 

Process finished with exit code 1 

exakt die gleiche Python-Datei lief gut auf meinem alten Mac. Ich bin nicht den gesamten Code zu veröffentlichen, weil es fast 1500 Zeilen lang ... Falls es ist hilfreich, hier sind meine Einfuhren aus dem oberen Rand des Code:

from kivy.app import App 
from kivy.clock import Clock 
from kivy.graphics import Color, Rectangle 
from kivy.uix.button import Button 
from kivy.uix.image import Image 
from kivy.uix.label import Label 
from kivy.uix.widget import Widget 
from random import randrange 

Jede Hilfe ist sehr zu schätzen!

Dies ist die neue Fehlermeldung nach der Installation von Kissen:

C:\Users\Me\AppData\Local\Programs\Python\Python36-32\python.exe C:/Users/Me/Desktop/PycharmProjects/music_game_kivy/music_game_kivy.py 
[INFO ] [Logger  ] Record log in C:\Users\Me\.kivy\logs\kivy_17-12-26_11.txt 
[INFO ] [Kivy  ] v1.10.0 
[INFO ] [Python  ] v3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] 
[INFO ] [Factory  ] 194 symbols loaded 
[INFO ] [Image  ] Providers: img_tex, img_dds, img_pil, img_gif (img_sdl2, img_ffpyplayer ignored) 
[INFO ] [Audio  ] Providers: (audio_ffpyplayer, audio_sdl2 ignored) 
[CRITICAL] [Window  ] Unable to find any valuable Window provider. 
sdl2 - ImportError: DLL load failed: The specified module could not be found. 
    File "C:\Users\Me\AppData\Local\Programs\Python\Python36-32\lib\site-packages\kivy\core\__init__.py", line 59, in core_select_lib 
    fromlist=[modulename], level=0) 
    File "C:\Users\Me\AppData\Local\Programs\Python\Python36-32\lib\site-packages\kivy\core\window\window_sdl2.py", line 26, in <module> 
    from kivy.core.window._window_sdl2 import _WindowSDL2Storage 

[INFO ] [Text  ] Provider: pil(['text_sdl2'] ignored) 
[CRITICAL] [App   ] Unable to get a Window, abort. 

Process finished with exit code 1 

Antwort

0

Für Fenster versuchen, folgenden Befehl über die Eingabeaufforderung:

pip install Pillow oder python -m pip install Pillow

Kissen ist ein Fork von PIL, die Python Imaging Library, die nicht mehr gepflegt wird. Um die Abwärtskompatibilität zu gewährleisten, wird jedoch der alte Modulname verwendet.

Für SDL2 versuchen folgende (Fenster):

python -m pip install kivy.deps.sdl2 
python -m pip install kivy.deps.glew 

oder versuchen:

python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew 
+0

für die Antwort, die Sie so vielen Dank! Die Installation von Pillow löste einen Teil des Problems. Der sdl2-Teil des Fehlers bleibt weiterhin bestehen. – Auggie

+0

können Sie die gesamte Fehlerverfolgung bereitstellen? –

+0

Ja, ich habe meine Frage bearbeitet. Vielen Dank! – Auggie

Verwandte Themen