Forum >> Principianti >> Problema di funzionamento kivi - Unable to find any valuable Window provider.

Pagina: 1

Ciao a tutti!
Ho un problema con kivi che proprio non ha nessuna intenzione di funzionare!

Scrivo un semplice codice come questo:

from kivy.app import App

from kivy.uix.button import Button

class PrimaApp(App):

    def build(self):

        return Button(text='Hello World')

PrimaApp().run()


ma ottengo questo errore:





[INFO ] [Logger ] Record log in C:\Users\tizia\.kivy\logs\kivy_21-04-27_6.txt

[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.3.2

[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.3.0

[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.0

[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.3.1

[INFO ] [Kivy ] v2.0.0

[INFO ] [Kivy ] Installed at "C:\Users\tiziaAppData\Roaming\Python\Python39\site-packages\kivy\__init__.py"

[INFO ] [Python ] v3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]

[INFO ] [Python ] Interpreter at "C:\Program Files\Python39\python.exe"

[INFO ] [Factory ] 186 symbols loaded

[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=None

[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60

[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=None

[DEBUG ] [image ] Failed trying to import the "sdl2" provider from "C:\Users\tiziaAppData\Roaming\Python\Python39\site-packages\kivy\core\image\_img_sdl2.cp39-win_amd64.pyd". This error is often encountered when a dependency is missing, or if there are multiple copies of the same dependency dll on the Windows PATH and they are incompatible with each other. This can occur if you are mixing installations (such as different python installations, like anaconda python and a system python) or if another unrelated program added its directory to the PATH. Please examine your PATH and python installation for potential issues. To further troubleshoot a "DLL load failed" error, please download "Dependency Walker" (64 or 32 bit version - matching your python bitness) from dependencywalker.com and set the environment variable KIVY_SDL2_DEPENDENCY_WALKER to the full path of the downloaded depends.exe file and rerun your application to generate an error report

[INFO ] [Image ] Providers: img_tex, img_dds, img_pil (img_sdl2, img_ffpyplayer ignored)

[DEBUG ] [Cache ] register <kv.texture> with limit=1000, timeout=60

[DEBUG ] [Cache ] register <kv.shader> with limit=1000, timeout=3600

[DEBUG ] [text ] Failed trying to import the "sdl2" provider from "C:\Users\tiziaAppData\Roaming\Python\Python39\site-packages\kivy\core\text\_text_sdl2.cp39-win_amd64.pyd". This error is often encountered when a dependency is missing, or if there are multiple copies of the same dependency dll on the Windows PATH and they are incompatible with each other. This can occur if you are mixing installations (such as different python installations, like anaconda python and a system python) or if another unrelated program added its directory to the PATH. Please examine your PATH and python installation for potential issues. To further troubleshoot a "DLL load failed" error, please download "Dependency Walker" (64 or 32 bit version - matching your python bitness) from dependencywalker.com and set the environment variable KIVY_SDL2_DEPENDENCY_WALKER to the full path of the downloaded depends.exe file and rerun your application to generate an error report

[DEBUG ] [Text ] Ignored <sdl2> (import error)

[INFO ] [Text ] Provider: pil(['text_sdl2'] ignored)

[DEBUG ] [App ] Loading kv <F:\Tiziano\PC & informatica\Python\Programmi\test.kv>

[DEBUG ] [App ] kv <F:\Tiziano\PC & informatica\Python\Programmi\test.kv> not found

[DEBUG ] [window ] Failed trying to import the "sdl2" provider from "C:\Users\tiziaAppData\Roaming\Python\Python39\site-packages\kivy\core\window\_window_sdl2.cp39-win_amd64.pyd". This error is often encountered when a dependency is missing, or if there are multiple copies of the same dependency dll on the Windows PATH and they are incompatible with each other. This can occur if you are mixing installations (such as different python installations, like anaconda python and a system python) or if another unrelated program added its directory to the PATH. Please examine your PATH and python installation for potential issues. To further troubleshoot a "DLL load failed" error, please download "Dependency Walker" (64 or 32 bit version - matching your python bitness) from dependencywalker.com and set the environment variable KIVY_SDL2_DEPENDENCY_WALKER to the

full path of the downloaded depends.exe file and rerun your application to generate an error report

[DEBUG ] [Window ] Ignored <sdl2> (import error)

CRITICAL [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes

sdl2 - ImportError: DLL load failed while importing _window_sdl2: Impossibile trovare il modulo specificato.

File "C:\Users\tiziaAppData\Roaming\Python\Python39\site-packages\kivy\core\__init__.py", line 58, in core_select_lib

mod = __import__(name='{2}.{0}.{1}'.format(

File "C:\Users\tiziaAppData\Roaming\Python\Python39\site-packages\kivy\core\window\window_sdl2.py", line 27, in <module>

from kivy.core.window._window_sdl2 import _WindowSDL2Storage




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








Ho trovato su internet molti che hanno avuto lo stesso problema ma tutte le soluzioni suggerite a me non hanno funzionato: qualcuno può aiutarmi?!?

Ho già provato a disinstallare tutto e installare nuovamente...ma niente!

Grazie a chi potrà aiutarmi!

Tiziano






ciao,
sei sicuro di avere installato tutto correttamente? magari prova a disinstallare kivy e reinstallarlo

controlla anche che nella cartella in cui è installato kivy siano presenti i DLL di SDL, ma che non ce ne sia più di uno dello stesso tipo (ad esempio, due SDL2.dll)


--- Ultima modifica di Il Linuxino in data 2021-04-27 15:56:47 ---
Ho già provato a disinstallare e reinstallare sia Python che Kivy...ma continua a non funzionare.
Allego la cartella bin di sdl2...





Allegati


Pagina: 1



Esegui il login per scrivere una risposta.