python - Trying to create Mac OS X app from pygame hello world -


i trying following "hello world" pygame app generate mac os x (10.8) app using pyinstaller:

import pygame, sys import pygame._view pygame.locals import *  pygame.init()  # set window windowsurface = pygame.display.set_mode((500, 400), 0, 32) pygame.display.set_caption('hello world!')  # set colors black = (0, 0, 0) white = (255, 255, 255)  # draw white background onto surface windowsurface.fill(white)  # draw black circle onto surface pygame.draw.circle(windowsurface, black, (250, 200), 20, 0)  # draw window onto screen pygame.display.update()  # run game loop while true:     event in pygame.event.get():         if event.type == quit:             pygame.quit()             sys.exit() 

the spec file looks this:

# -*- mode: python -*- = analysis(['test.py'],              pathex=['/users/ronan/documents/projects/python/test'],              hiddenimports=[],              hookspath=none,              runtime_hooks=none) pyz = pyz(a.pure) exe = exe(pyz,           a.scripts,           exclude_binaries=true,           name='test',           debug=true,           strip=none,           upx=false,           console=false ) coll = collect(exe,                a.binaries,                a.zipfiles,                a.datas,                strip=none,                upx=false,                name='test') app = bundle(coll, name='test.app') 

pyinstaller seems job fine , creates dist folder test.app in it. doesn't run however. when run dist folder excecutable command line following error:

traceback (most recent call last):   file "<string>", line 11, in <module>   file "/users/ronan/documents/projects/python/test/dist/test/eggs/setuptools-0.6c12dev_r88846-py2.7.egg/pkg_resources.py", line 698, in <module>   ...   lookuperror: no codec search functions registered: can't find encoding 

i have had real challenge getting windows pyinstaller working have got now. hardest part lack of coherent error messages. python , pygame , want cross hurdle of deployment. obviously, not real application think if "hello world" working on mac, combined learned getting working on windows, should able figure of out. also, think if figure out of real other pygame developers out there.

it may better use cx_freeze mac


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -