--onefile does not include pygame under ubuntu

142 views
Skip to first unread message

enrike

unread,
Feb 12, 2012, 3:32:48 PM2/12/12
to PyInstaller
Hi

I am trying to package a small app that uses pygame under Ubuntu. I am
running the latest pyinstaller git code I just downloaded. If I run
pyinstaller.py with no flags I get a directory with my app and all the
libraries required. I can run successively my app from command line.
However if I package it with --onefile flag the resulting binary
crashes because it cannot find the pygame libraries

$ ./hidserver
Traceback (most recent call last):
File "<string>", line 61, in <module>
File "/home/r2d2/Mahaigaina/pyinstaller-pyinstaller-c10176b/
PyInstaller/loader/iu.py", line 449, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "/home/r2d2/Mahaigaina/pyinstaller-pyinstaller-c10176b/
PyInstaller/loader/iu.py", line 539, in doimport
exec co in mod.__dict__
File "/home/r2d2/Mahaigaina/pyinstaller-pyinstaller-c10176b/
hidserver/build/pyi.linux2/hidserver/out03-PYZ.pyz/pygame", line 95,
in <module>
File "/home/r2d2/Mahaigaina/pyinstaller-pyinstaller-c10176b/
PyInstaller/loader/iu.py", line 468, in importHook
raise ImportError("No module named %s" % fqname)
ImportError: No module named pygame.base

Copying all the .so files manually to the directory allows the app to
work properly. Anyone knows if there is some workaround? maybe some
way to force pyinstaller to include pygame?

sorry if I am missing something very simple or obvious, I am new to
pyinstaller

thanks

enrike

Hartmut Goebel

unread,
Feb 12, 2012, 5:32:32 PM2/12/12
to pyins...@googlegroups.com
Am 12.02.2012 21:32, schrieb enrike:
> Copying all the .so files manually to the directory allows the app to
> work properly. Anyone knows if there is some workaround? maybe some
> way to force pyinstaller to include pygame?

Please red and folle the instructions at
<http://www.pyinstaller.org/wiki/HowtoReportBugs#Beforesubmittingareport:Makesureeverythingispackaged>

There is already a ticket for problems with pygame:
http://www.pyinstaller.org/ticket/404

--
Schönen Gruß - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult ist Mitglied bei http://www.7-it.de


enrike

unread,
Feb 13, 2012, 8:23:33 AM2/13/12
to pyins...@googlegroups.com, Hartmut Goebel
ig., 2012.eko otsren 12a 23:32(e)an, Hartmut Goebel(e)k idatzi zuen:

> Am 12.02.2012 21:32, schrieb enrike:
>> Copying all the .so files manually to the directory allows the app to
>> work properly. Anyone knows if there is some workaround? maybe some
>> way to force pyinstaller to include pygame?
>
> Please red and folle the instructions at
> <http://www.pyinstaller.org/wiki/HowtoReportBugs#Beforesubmittingareport:Makesureeverythingispackaged>
>
> There is already a ticket for problems with pygame:
> http://www.pyinstaller.org/ticket/404

ah, sorry I did not see this before,thanks for the links

I see that, for instance, the pygame/base.so file is included in the
out00-Analisys.toc and out06-COLLECT.toc and it is also listed by

$ python ./utils/ArchiveViewer.py ./hidserver/dist/hidserver
...
(4002591, 6334, 19024, 1, 'b', 'pygame.base.so'),
...

so it looks like it is there but it cannot be loaded somehow.

anyway I also tried with latest stable version 1.5.1 of pyinstaller and
it this problem does not happen there

thanks

enrike

Giovanni Bajo

unread,
Feb 14, 2012, 10:58:48 AM2/14/12
to pyins...@googlegroups.com

Looks like it's another regression we have wrt to 1.5.1.

Can you please attach a minimal reproduction example to the ticket? We
can mark it as stopper for 2.0 then.
--
Giovanni Bajo :: ra...@develer.com
Develer S.r.l. :: http://www.develer.com

My Blog: http://giovanni.bajo.it

Reply all
Reply to author
Forward
0 new messages