Shingrace的个人博客分享 http://blog.sciencenet.cn/u/Shingrace

博文

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

已有 6365 次阅读 2017-6-25 13:52 |个人分类:python|系统分类:科研笔记

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_examples

All 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@master

https://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.




https://blog.sciencenet.cn/blog-669638-1062845.html

上一篇:Pandas--basis
下一篇:python下安装eemd
收藏 IP: 36.102.227.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-3-29 13:32

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部