[PyInstaller,Windows] ImportError (pygame.pkgdata) running the packaged version of touchtracer

398 views
Skip to first unread message

Jochem Liem

unread,
Aug 6, 2014, 9:36:07 AM8/6/14
to kivy-...@googlegroups.com
Dear all,

I'm trying to package and run the touchtracer demo as described in the documentation [1]. The packaging goes flawlessly, but when I run the application I get an error:

C:\PyInstaller\touchtracer\dist\touchtracer>touchtracer.exe
Traceback (most recent call last):
  File "<string>", line 34, in <module>
ImportError: No module named pygame.pkgdata

I've tried to install pygame and repackage, but it makes no difference. 

I saw something like this used to be a problem on MacOSX [2,3]. However, the file containing the patch does not seem to exist in the current stable release of Kivy [3]. Moreover, from the pygame side, this problem will only be solved in pygame 1.9.2 [4].

My configuration:
Windows 7 Ultimate (SP1)
Kivy 1.8.0
PyInstaller 2.1
Python 2.7.8
PyGame 1.9.1 (first without, then with)

Could it be that this is bug? Or am I doing something wrong? I've tried to reproduce the issue on my Mac, but I get a different error (which I will report in a separate email).

Best regards,
Jochem



ZenCODE

unread,
Aug 6, 2014, 10:19:38 AM8/6/14
to kivy-...@googlegroups.com
Hi

Are you sure you are using the portable version of Kivy (kivy.bat) to launch and perform you build, not the default Python? This error is typical of that omission as pygame needs to be pulled from the portable package...

Jochem Liem

unread,
Aug 6, 2014, 11:37:11 AM8/6/14
to kivy-...@googlegroups.com
Thanks, that was exactly the problem. Now I can run both the touchtracer application and my own from the packaged version.

Thanks again,
Jochem

ZenCODE

unread,
Aug 6, 2014, 3:11:41 PM8/6/14
to kivy-...@googlegroups.com
Great! Yeah, I know that one very well because I altered some paths in the "kivy.bat" and then months later forgot. Then when I tried my pyinstaller, I bashed my head against that error for almost a full day. Tried it in a VM, and voilla, worked first time. Then it dawned on me..;-)

J.A.

unread,
Apr 21, 2015, 3:08:10 PM4/21/15
to kivy-...@googlegroups.com
I'm running into the same problem described here. Could you explain the solution? I double click the kivy.bat file, cd to pyinstaller, and then "python pyinstaller.py --name myFile ..\path\to\myFile\main.py". Then I make the requisite changes in the .spec file, and call "python pyinstaller.py myFile\myFile.spec". Then when I go to start the .exe, I get the same issue as described above.

thanks,
J.A.

Fernando José Redondo García

unread,
Apr 23, 2015, 10:54:48 AM4/23/15
to kivy-...@googlegroups.com
I have the same problem. I am desperated :(

What can I do? Could be a problem of my 64 bits system? I need to use Kivy...

Carsten Thielepape

unread,
Apr 24, 2015, 1:46:06 AM4/24/15
to kivy-...@googlegroups.com
Same for me (and yes I initialize with kivy.bat.... :-) )

James Townley

unread,
Apr 27, 2015, 4:09:41 PM4/27/15
to kivy-...@googlegroups.com
I'm running into the same issue and have tired on a couple machines with a couple of different apps.
So I posted a bug here:

Erik

unread,
Apr 27, 2015, 5:12:54 PM4/27/15
to kivy-...@googlegroups.com
I got "past" the missing pygame.pkgdata by installing pygame 1.9.1 through the installer on their website, but now the application crashes with critical warning "Unable to find any valuable window provider at all!" and "Exception SystemExit: 1 in 'kivy.properties.dpi2px' ignored.
I tried forcing the use of pygame:

import os

os.environ["KIVY_WINDOW"] = "pygame"

no luck though.

Op vrijdag 24 april 2015 07:46:06 UTC+2 schreef Carsten Thielepape:

James Townley

unread,
Apr 28, 2015, 3:05:58 PM4/28/15
to kivy-...@googlegroups.com
So this was a bug in the 1.9.0 release. Here is a conversation with one of then devs.

LaTeX-Pythonn -     Hello. Has anyone in the community successfully packaged an app for windows x64 using pyinstaller 2.1, kivy portable v.1.9.0 and python 2.7?
matham -            I did
matham -            what's the problem?      
LaTeX-Pythonn -     After packaging i get No module named pygame.pkgdata
matham -            LaTeX-Python, actually it was x86, but it should be similar
LaTeX-Python -      which is odd as there should be no more pygame
matham -            LaTeX-Python, you need to use master for that
matham -            there is a bug that was fixed
matham -            or you can update your local kivy packaging to master as:
matham -            i.e. replace your local file with that (but you should update to master :) )
matham -            also, make sure to follow the updated sdl2 instructions on the website

Carsten Thielepape

unread,
Apr 30, 2015, 4:52:05 AM4/30/15
to kivy-...@googlegroups.com
Hi Ereirc,

try to set the ms-windows screen colordepth to 32bit
Reply all
Reply to author
Forward
0 new messages