[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] py2app my pygame - errors



Its not a pygame specific question but it might be a useful topic for those
wanting to package their pygame for OSX and Im hoping somebody here has had
experience AND success in doing so.

python version: 2.7
pygame version: 1.9.2pre
py2app version: 0.7.3

I dont get any errors during the build process but only when I double click
the .app file that is created do I get the following in console...

/2/07/13 12:21:00.003 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
/Users/diadem/Desktop/Python
Files/dist/main.app/Contents/Resources/main.py:1: RuntimeWarning: import
display: No module named _view
2/07/13 12:21:00.003 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
(ImportError: No module named _view)
2/07/13 12:21:00.004 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
/Users/diadem/Desktop/Python
Files/dist/main.app/Contents/Resources/main.py:1: RuntimeWarning: import
draw: No module named _view
2/07/13 12:21:00.004 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
(ImportError: No module named _view)
2/07/13 12:21:00.008 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
/Users/diadem/Desktop/Python
Files/dist/main.app/Contents/Resources/main.py:1: RuntimeWarning: import
image: No module named _view
2/07/13 12:21:00.008 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
(ImportError: No module named _view)
2/07/13 12:21:00.018 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
/Users/diadem/Desktop/Python
Files/dist/main.app/Contents/Resources/main.py:1: RuntimeWarning: import
pixelcopy: No module named _view
2/07/13 12:21:00.018 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
(ImportError: No module named _view)
2/07/13 12:21:00.020 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
/Users/diadem/Desktop/Python
Files/dist/main.app/Contents/Resources/main.py:1: RuntimeWarning: import
transform: No module named _view
2/07/13 12:21:00.020 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
(ImportError: No module named _view)
2/07/13 12:21:00.769 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
ERROR: pygame.macosx import FAILED
2/07/13 12:21:00.769 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
Traceback (most recent call last):
2/07/13 12:21:00.769 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File "/Users/diadem/Desktop/Python
Files/dist/main.app/Contents/Resources/__boot__.py", line 65, in <module>
2/07/13 12:21:00.769 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:    
_run()
2/07/13 12:21:00.769 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File "/Users/diadem/Desktop/Python
Files/dist/main.app/Contents/Resources/__boot__.py", line 60, in _run
2/07/13 12:21:00.769 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:     
2/07/13 12:21:00.770 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
exec(compile(source, path, 'exec'), globals(), globals())
2/07/13 12:21:00.770 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File "/Users/diadem/Desktop/Python
Files/dist/main.app/Contents/Resources/main.py", line 2645, in <module>
2/07/13 12:21:00.770 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:    
intro()
2/07/13 12:21:00.770 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File "/Users/diadem/Desktop/Python
Files/dist/main.app/Contents/Resources/main.py", line 1900, in intro
2/07/13 12:21:00.771 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:    
screen = pygame.display.set_mode((RESOLUTION))
2/07/13 12:21:00.771 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File "pygame/macosx.pyc", line 8, in <module>
2/07/13 12:21:00.771 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File "pygame/pkgdata.pyc", line 27, in <module>
2/07/13 12:21:00.771 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",
line 698, in <module>
2/07/13 12:21:00.771 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:    
class Environment(object):
2/07/13 12:21:00.771 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",
line 701, in Environment
2/07/13 12:21:00.771 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:    
def __init__(self, search_path=None, platform=get_supported_platform(),
python=PY_MAJOR):
2/07/13 12:21:00.771 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",
line 96, in get_supported_platform
2/07/13 12:21:00.772 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:    
plat = get_build_platform(); m = macosVersionString.match(plat)
2/07/13 12:21:00.772 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",
line 222, in get_build_platform
2/07/13 12:21:00.772 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:    
plat = get_platform()
2/07/13 12:21:00.772 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/util.py",
line 98, in get_platform
2/07/13 12:21:00.772 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py",
line 498, in get_config_vars
2/07/13 12:21:00.772 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:  
File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/sysconfig.py",
line 392, in _init_posix
2/07/13 12:21:00.772 PM [0x0-0x5fb5fb].org.pythonmac.unspecified.main:
distutils.errors.DistutilsPlatformError: invalid Python installation: unable
to open /usr/include/python2.7/pyconfig.h (No such file or directory)
2/07/13 12:21:00.903 PM main: main Error
2/07/13 12:21:02.830 PM com.apple.launchd.peruser.502:
([0x0-0x5fb5fb].org.pythonmac.unspecified.main[8602]) Exited with code: 255/

Heres my setup file...

/"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['main.py']
DATA_FILES = []
OPTIONS = {}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)/



--
View this message in context: http://pygame-users.25799.x6.nabble.com/py2app-my-pygame-errors-tp793.html
Sent from the pygame-users mailing list archive at Nabble.com.