Unable to get a window, abort

后端 未结 6 1271
别那么骄傲
别那么骄傲 2020-11-30 07:38

I\'m getting what seems to be a common error running the Kivy hello world program. I\'ve tried the solutions I\'ve seen here: manually install gstreamer, adding

6条回答
  •  一向
    一向 (楼主)
    2020-11-30 08:22

    Try putting \share\sdl2\bin to your path, it should do the trick. The thing is that it can't find the sdl2 binary it works with. There probably even isn't any PIL window provider, so using environment variable won't do a thing for creating a window (it'll be used as an image provider though).

    I'm not really familiar with PySDL2, so I can't help you with that, however I made an installer for Kivy on Windows to make things easier for beginners.

    There are basically two ways you'll end up with anyway:

    1. You'll put the bin folders to a PATH variable permanently

      I consider it really stupid unless you're sure you won't delete Python or the folder, otherwise you'll have a ghost folder in PATH + all other programs will have an access to files in bin folders via PATH

    2. You'll have a batch file that does that temporarily

      Only programs ran from the console/batch will have an access to the bin folder.

    The installer does that for you and in fact does even installing from scratch (no Python) or many other things.

    In case you haven't installed the Kivy dependencies, please do it first.

提交回复
热议问题