On 06/01/2012 8:21 AM, Nick Arnoeyts wrote:
Adding _view to the imports list fixed it. Thank you very much for a swift answer.

@Zack
That should work, since I'm doing something similar.

Op 6 januari 2012 03:06 schreef Zack Baker <[email protected] <mailto:[email protected]>> het volgende:

    Ok so I want to create an executable but one of my files is
    basically import game and then game.play(). Can I execute the file
    that has like 2 lines or should I put everything into one file and
    build and execute that. Btw I'm on a Mac with python 2.7 do which
    'compiler' should I use? The Build Applet tool that comes with it
    doesn't seem to work

    -Zack


    On Jan 5, 2012, at 7:31 PM, Lenard Lindstrom <[email protected]
    <mailto:[email protected]>> wrote:

    > Hi,
    >
    > On 05/01/12 02:16 PM, Nick Arnoeyts wrote:
    >> Hey everyone
    >>
    >> I'm trying to get to know cx_freeze as an alternative to py2exe
    but I've run into some problems. There don't seem to be any errors
    in creating the exe, however when running the exe there are
    complaints about missing modules and DLL Load Errors (see below
    for the error message).
    >>
    >> I am using Python 2.7 (32-bit) on Windows 7 SP1 (64-bit). Tell
    me if there is anything else I have to post and I will do my best.
    >>
    >> Thanks in advance for your help.
    >>
    >> ------------------------------
    >>
    >>
    D:\home\Dropbox\code\eclipse-workspace\TestGame01\build\exe.win32-2.7>main
    >> main:1: RuntimeWarning: import display: No module named _view
    >> (ImportError: No module named _view)

[snip: etc...]

    >
    >> NotImplementedError: font module not available
    >> (ImportError: DLL load failed: %1 is not a valid Win32
    application.)
    > Oops, I better add a token _view import to the Pygame package
    __init__.py.
    >
    > In lib\__init__.py, near the bottom, is a "def
    package_imports():" with a bunch of import statements in the body.
    Add an import "pygame._view" to the end of the list. This should
    be picked up by cx_freeze and get _view included in the package. I
    will fix this in the repository soon.
    >
    > Module _view adds a wrapper class that exposes Surface data with
    a NumPy style array interface. It is used by surfarray.
    >
    > Lenard Lindstrom
    >


Great. I will make add the change to the repository.

Lenard Lindstrom

Reply via email to