sandialabs / snl-quest

An open source, Python-based software platform for energy storage simulation and analysis developed by Sandia National Laboratories.
Other
130 stars 39 forks source link

[CRITICAL] [Window ] Unable to find any valuable Window provider #30

Open cancom84 opened 3 years ago

cancom84 commented 3 years ago

[INFO ] [Logger ] Record log in C:\Users\tunguy.kivy\logs\kivy_21-08-13_6.txt [INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.3.2 [INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.3.1 [INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.0 [INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.3.0 [INFO ] [Kivy ] v2.0.0 [INFO ] [Kivy ] Installed at "C:\Users\tunguy\Anaconda3\lib\site-packages\kivy-2.0.0-py3.8-win-amd64.egg\kivy__init__.py" [INFO ] [Python ] v3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)] [INFO ] [Python ] Interpreter at "C:\Users\tunguy\Anaconda3\python.exe" [INFO ] [Factory ] 186 symbols loaded [INFO ] [Image ] Providers: img_tex, img_dds, img_pil (img_sdl2, img_ffpyplayer ignored) [INFO ] [Text ] Provider: pil(['text_sdl2'] ignored) [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: The specified module could not be found.

cancom84 commented 3 years ago

This error occurs if you have 3.7+ python. First you need to uninstall kivy and its deps:

python -m pip uninstall kivy

python -m pip uninstall kivy.deps.sdl2

python -m pip uninstall kivy.deps.glew

python -m pip uninstall kivy.deps.gstreamer

python -m pip uninstall image

Then you should install it again without gstreamer and you might need to install pyutilib: python -m pip install --upgrade pip wheel setuptools

python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew --extra-index-url https://kivy.org/downloads/packages/simple/

python -m pip install kivy

python -m pip install pyutilib

Now install QuESt again:

python setup.py develop

It should solve the the problem

atribera commented 2 years ago

This error can be avoided if Kivy is installed before running python setup.py develop in a conda environment.

However, if a Windows command prompt is used, this issue may persist even if Kivy is installed first.

In that case, uninstall Kivy with its dependencies by entering the following in the command prompt:

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

Optional (if your pip and setuptools are not up-to-date):

python -m pip install --upgrade pip wheel setuptools
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew --extra-index-url https://kivy.org/downloads/packages/simple/

Then, reinstall Kivy:

python -m pip install kivy

The setup.py file has been updated to include the pyutilib package, so no need to install it again.

Tim-Keicher commented 9 months ago

I had the same problem, but I got the error after changing some configs via the Config.set functions. So I deleted the config.ini file. If no one exist, kivy will create a new one with the next run.