||
It took me a whole day to fix this problem.WhenI run the simplest kivy example .py errors show as flowing,
....
[CRITICAL][Window]Unable to find any valuable Window provider.
....
[CRITICAL][App]Unable to get a Window, abort.
Finally, it works after a lot of trials.But honestly, I don't know the cause/reason clearly enough.
Because I don't know too much computerscience.
I followed these following steps, based onWindows 7 system, Python 3.5.2,
Step 1
following the user's guide >Installation on Windows
https://kivy.org/docs/installation/installation-windows.html#installation
pipinstall--upgradepipwheelsetuptoolspipinstalldocutilspygmentspypiwin32kivy.deps.sdl2kivy.deps.glewpipinstallkivy.deps.gstreamerpipinstallkivy.deps.anglepipinstallkivypipinstallkivy_examplesAll successfully installed. However, whenI run any simple kivy example.py, errors show like the abovementioned.
Search a lot of solutions from the googleand baidu.
Note
For Python < 3.5 we use the MinGW compiler. However, forPython 3.5+ on Windows we currently only support the MSVC compiler because ofthe following Python issue 4709 about MinGW. Generally this shouldmake no difference when using precompiled wheels.
I missed this dependency.
So, I need to install the MSVC compiler, i.e.the Microsoft Visual Studio. Some guy suggest to look into the "_msvccompiler.py"file in the python path. You will find the "if version >= 14"-likesentences. It means that you have to install the Microsoft Visual Studio laterthan 2014.
Step 2.
Following another guy "代代树", https://www.zhihu.com/question/26857761
I found the Visual Studio 2015, anddownload the file TA recommended. Chose C++ and for Python options.
The Visual Studio 2015 installation took avery long time to finish.
Finally, successfully installed.
But unfortunately, still errors.
Step 3
Try a code line on the CMD.
pip install git+https://github.com/kivy/kivy.git@masterhttps://stackoverflow.com/questions/43845704/pycharm-with-kivy-error-critical-app-unable-to-get-a-window-abort
AND, Very glad it runs successfully.
But I really don't know why.
Happy to move on to build my APP. And Iknow the road is tortuous.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-3-29 13:32
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社