How to run the examples on Linux

2,781 views
Skip to first unread message

Suresh V

unread,
Mar 31, 2013, 5:12:33 AM3/31/13
to kivy-...@googlegroups.com
When I try to run the canvas example, I get:

$ python2.7 bezier.py

[INFO   ] Kivy v1.6.0
[INFO   ] [Logger      ] Record log in /home/suresh/.kivy/logs/kivy_13-03-31_3.txt
[INFO   ] [Factory     ] 137 symbols loaded
[DEBUG  ] [Cache       ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG  ] [Cache       ] register <kv.image> with limit=None, timeout=60s
[DEBUG  ] [Cache       ] register <kv.atlas> with limit=None, timeout=Nones
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_gif (img_pygame, img_pil ignored)
[DEBUG  ] [Cache       ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG  ] [Cache       ] register <kv.shader> with limit=1000, timeout=3600s
[DEBUG  ] [App         ] Loading kv <./main.kv>
[DEBUG  ] [App         ] kv <./main.kv> not found
[DEBUG  ] [Window      ] Ignored <pygame> (import error)
[WARNING] [WinPygame   ] SDL wrapper failed to import!
[DEBUG  ] [Window      ] Ignored <sdl> (import error)
[DEBUG  ] [Window      ] Ignored <x11> (import error)
[CRITICAL] [Window      ] Unable to find any valuable Window provider at all!
[CRITICAL] [App         ] Unable to get a Window, abort.

Any ideas?

Akshay Arora

unread,
Mar 31, 2013, 10:02:48 AM3/31/13
to kivy-...@googlegroups.com
[DEBUG  ] [Window      ] Ignored <pygame> (import error)




--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

John Lawman

unread,
Apr 15, 2013, 5:38:28 PM4/15/13
to kivy-...@googlegroups.com
I've installed all the dependencies (building from source on Slackware 14)

I can import pygame via the python shell and I downloaded an example script for pygame and it renders to the screen fine. However if I import sdl the module is not found. 

If I try to run any kivy examples I get the same problem as reported in this thread - ".Unable to find any valuable Window provider at all!.."

The following versions are installed:
sdl 1.2.14
Cython 0.17.3
pygame 1.7.1
pyenchant 1.6.5
gst-python 0.10.22

I've managed to compile everything but I'm at a loss what to try next.


Thanks-in-advance 

JL

Gabriel Pettier

unread,
Apr 15, 2013, 7:13:49 PM4/15/13
to kivy-...@googlegroups.com
Hi,

You should try to put kivy in debug mode (see line "log=" in
~/.kivy/config.ini and put the "debug" value) and try.

Also, sharing a full log could help us help you :).

regards.

John Lawman

unread,
Apr 16, 2013, 3:31:28 AM4/16/13
to kivy-...@googlegroups.com
Okay, when I'm back on my PC later tonight I'll have another crack at it and post progress here. I will of course produce logs too :)

btw, I'm using a distro called Porteus (runs from a USB stick) when I get kivy working I'm going to release the packages so other people can use it.


 :)

John Lawman

unread,
Apr 16, 2013, 3:48:06 PM4/16/13
to kivy-...@googlegroups.com
Log output:
[INFO              ] Logger: Record log in /root/logs/kivy_13-04-16_0.txt
[ESC[1;32mINFOESC[0m   ] Kivy v1.6.0
[INFO              ] Factory: 137 symbols loaded
[DEBUG             ] Cache: register <kv.image> with limit=None, timeout=60s
[DEBUG             ] Cache: register <kv.atlas> with limit=None, timeout=Nones
[INFO              ] Image: Providers: img_tex, img_dds, img_pygame, img_pil, img_gif 
[DEBUG             ] Cache: register <kv.texture> with limit=1000, timeout=60s
[DEBUG             ] Cache: register <kv.shader> with limit=1000, timeout=3600s
[DEBUG             ] Cache: register <kv.lang> with limit=None, timeout=Nones
[INFO              ] Text: Provider: pygame
[INFO              ] Window: Provider: pygame
[WARNING           ] WinPygame: Video: failed (multisamples=2)
[WARNING           ] WinPygame: trying without antialiasing
[WARNING           ] WinPygame: SDL wrapper failed to import!
[DEBUG             ] Window: Ignored <sdl> (import error)
[DEBUG             ] Window: Ignored <x11> (import error)
[CRITICAL          ] Window: Unable to find any valuable Window provider at all!
[CRITICAL          ] App: Unable to get a Window, abort.
[WARNING           ] stderr: Exception SystemExit: 1 in 'kivy.properties.dpi2px' ignored
[CRITICAL          ] App: Unable to get a Window, abort.




John Lawman

unread,
Apr 17, 2013, 3:52:33 AM4/17/13
to kivy-...@googlegroups.com
So looking at the log output there is something wrong with SDL?

What provides WinPygame? is it pygame or kivy that provides it?

Why does the the sdl wrapper fail to import?

I'm just looking for the benefit of someone's experience - I'm not expecting this to be solved for me.

Do I need to wear a tutu and a mankini before I'm leet enough to get answers?

:)


Akshay Arora

unread,
Apr 17, 2013, 7:09:29 AM4/17/13
to kivy-...@googlegroups.com
Try to raise this as a issue on http://github.com/kivy/kivy/issues.

What do you get when you run the following code?
$ python
>>> import kivy
>>> from kivy.core.window import Window

Does it show the same error as before ?

$ python
>>> import pygame
>>> pygame.display.init()
>>> pygame.display.set_mode((640, 480), pygame.HWSURFACE|pygame.OPENGL|pygame.DOUBLEBUF)


What's the output of the code above?


Best Regards


John Lawman

unread,
Apr 17, 2013, 1:17:12 PM4/17/13
to kivy-...@googlegroups.com
I get a blank window

[INFO   ] Kivy v1.6.0
[WARNING] [Config      ] Older configuration version detected (0 instead of 7)
[WARNING] [Config      ] Upgrading configuration in progress.
>>> from kivy.core.window import Window
[INFO   ] [Logger      ] Record log in /home/guest/.kivy/logs/kivy_13-04-17_0.txt
[INFO   ] [Window      ] Provider: pygame
[DEBUG  ] [Cache       ] register <kv.image> with limit=None, timeout=60s
[DEBUG  ] [Cache       ] register <kv.atlas> with limit=None, timeout=Nones
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_pygame, img_pil, img_gif 
[DEBUG  ] [Cache       ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG  ] [Cache       ] register <kv.shader> with limit=1000, timeout=3600s
[WARNING] [WinPygame   ] SDL wrapper failed to import!
[DEBUG  ] [Window      ] Ignored <sdl> (import error)
[DEBUG  ] [Window      ] Ignored <x11> (import error)
[CRITICAL] [Window      ] Unable to find any valuable Window provider at all!



Again, I get a blank window.


>>> import pygame
>>> pygame.display.init()
>>> pygame.display.set_mode((640, 480), pygame.HWSURFACE|pygame.OPENGL|pygame.DOUBLEBUF)
<Surface(640x480x32 SW)>
>>> 

I have a notenook with Ubuntu installed - I'll try installing packages on that. 

I'll keep looking into why it's not working in Slackware 14 - Installing from source is important to me. I'm planning to develop a multi-latform computer game.

Thanks for the help

Akshay Arora

unread,
Apr 17, 2013, 2:01:08 PM4/17/13
to kivy-...@googlegroups.com
Just to be thorough, since you are installing from source, could you install kivy from github? Remove any previous installations of kivy then::

    git clone http://github.com/kivy/kivy
    cd kivy
    make

After make has completed, export PYTHONPATH=/path/to/kivy

Then retry running your example.

John Lawman

unread,
Apr 17, 2013, 5:11:21 PM4/17/13
to kivy-...@googlegroups.com
I still get exactly the same errors

I'll have to give up just now. 

When I get a chance I'll install binaries under an Ubuntu installation. If I can get that to work I'll revisit compiling from source under slackware until then I'll find an alternative method for developing game - multi-platform will have to wait.

Thanks for your help though.

qua-non

unread,
Apr 18, 2013, 8:17:44 AM4/18/13
to kivy-...@googlegroups.com

It seems WinPygame provider is failing without providing any debug info on why it's failing in your case.
Could you set log_levet = trace in ~/config.ini http://kivy.org/docs/api-kivy.logger.html and then run the examples.

Best Regards

John Lawman

unread,
Apr 18, 2013, 4:03:40 PM4/18/13
to kivy-...@googlegroups.com
I'll try that tomorrow when I get a chance.

I followed the install instructions and installed kivy on a notebook running 11.04 of Ubuntu.

This time everything seemed to work - got a window but need to upgrade x11 drivers (only support opengl 1.4) - it seems to work.

What I have noticed that pygame is at 1.9.1 on Ubuntu. The version I was using on Slackware was pygame 1.7 - this version is too old?

I'll try what you suggested and then I'll patch pygame 1.9 (won't compile camera driver) and see if that makes a difference


:)

JL

Ben Rousch

unread,
Apr 18, 2013, 4:08:33 PM4/18/13
to kivy-...@googlegroups.com
For the record, Ubuntu 11.04 is out of support so you may have trouble installing packages and updates. You should really be using Ubuntu 12.04.

John Lawman

unread,
Apr 18, 2013, 4:37:05 PM4/18/13
to kivy-...@googlegroups.com
I know. It's the first time I switched on the notebook for months. Currently upgrading installation to 11.10. Will install latest ubuntu at the weekend.

John Lawman

unread,
Apr 21, 2013, 7:59:25 PM4/21/13
to kivy-...@googlegroups.com
A quick update:

Upgraded notebook to ubuntu 12.04 and kivy runs very smoothly on it
(it's a Compaq atom duel core with Intel gpu)

Also installed pygame 1.9.1 package (from arch linux) to my slack ware installation and kivy now runs as expected.

I'm assuming that pygame 1.9.1 is the minimum version needed for kivy.

I'll post more details if anyone needs more info.
Reply all
Reply to author
Forward
0 new messages