Thank you, it was most helpful.  Unfortunately, the linked issue is closed and doesn't seem to have as much connection to the problem as I'd like (or an open issue on the PyInstaller tracker itself).  I'm wondering if this will be "fixed", in any way, or if we should live with it.  In my case, the reason why pkg_resources is needed is to load fonts (a .tif file if I'm not mistaken) so pygame cannot find it and PyInstaller probably doesn't.  But perhaps there's a way around it, to include the .tif file somewhere else in a data file... I'll look into that.

In any case, thank you for the answer, I have a better idea of what's going on.


Vincent

On 6/21/2019 2:36 AM, Raoul Snyman wrote:
Hi Vincent,

I was just browsing the PyInstaller documentation the other day
looking for something unrelated, but I came across this question in
the FAQ:

What about pkg_resources?
pkg_resources is currently not supported by PyInstaller. This means
that an application using a library which uses the the pkg_resources
API will probably not work out of the box. The only situation in which
it works is when it's being used on .egg files (see above). For
details follow issue #183.

See https://github.com/pyinstaller/pyinstaller/wiki/FAQ

It may be that PyGame is trying to load something via pkg_resources?

I'm sorry I can't be of more help, I'm not very familiar with pygame
or pkg_resources.


On Thu, Jun 20, 2019 at 8:42 AM Vincent Le Goff
<[email protected]> wrote:
Hello,


I'm a new user of PyInstaller and appreciate its simplicity.  I have,
however, noticed a problem when using pygame.


pygame is an interesting Python library to create games.  It handles
basic operations (like a simple 2D window, sound output, keyboard
processing and so on).  When trying to make an executable out of a game
using pygame, everything seems to work... but things break when pygame
attempts to load its fonts.  Here's the end of the traceback I receive
on calling pygame.font.Font (this is in the executable, not the original
Python script):


    File "site-packages\pygame\pkgdata.py", line 50, in getResource
    File "site-packages\pkg_resources\__init__.py", line 1134, in
resource_exists
    File "site-packages\pkg_resources\__init__.py", line 1404, in
has_resource
    File "site-packages\pkg_resources\__init__.py", line 1464, in _has
NotImplementedError: Can't perform this operation for unregistered
loader type


(I am running the pyinstaller script in a virtualenv, which might also
play a role.)


4The problem doesn't seem to come from pygame directly.  I only have the
slightest idea of what pkg_resources actually does.  Does it sound
familiar to you?  And how to fix it?


Thanks for your help,


Vincent

--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/4e5a8c6f-c93e-e712-2583-b0da68332a2a%40gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/d29b6374-008c-a5d5-dfe5-944df7bfbb00%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to