fogleman / Minecraft

Simple Minecraft-inspired program using Python and Pyglet
MIT License
5.25k stars 1.24k forks source link

Wrong architecture - OS X #7

Closed tibbon closed 11 years ago

tibbon commented 11 years ago

Running on 10.8.2 I get this error Macbook Pro:Minecraft tibbon$ arch -i386 python main.py Traceback (most recent call last): File "main.py", line 1, in <module> from pyglet.gl import * File "/Library/Python/2.7/site-packages/pyglet/gl/__init__.py", line 510, in <module> import pyglet.window File "/Library/Python/2.7/site-packages/pyglet/window/__init__.py", line 1669, in <module> from pyglet.window.carbon import CarbonPlatform, CarbonWindow File "/Library/Python/2.7/site-packages/pyglet/window/carbon/__init__.py", line 69, in <module> framework='/System/Library/Frameworks/QuickTime.framework') File "/Library/Python/2.7/site-packages/pyglet/lib.py", line 90, in load_library return self.load_framework(kwargs['framework']) File "/Library/Python/2.7/site-packages/pyglet/lib.py", line 226, in load_framework lib = ctypes.cdll.LoadLibrary(realpath) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 431, in LoadLibrary return self._dlltype(name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 353, in __init__ self._handle = _dlopen(self._name, mode) OSError: dlopen(/System/Library/Frameworks/QuickTime.framework/QuickTime, 6): no suitable image found. Did find: /System/Library/Frameworks/QuickTime.framework/QuickTime: mach-o, but wrong architecture /System/Library/Frameworks/QuickTime.framework/QuickTime: mach-o, but wrong architecture

drocpdp commented 11 years ago

http://roguejs.com/2011-11-22/getting-pyglet-to-work-on-mac-osx-lion/

fogleman commented 11 years ago

Try installing Python 2.7 instead of using the built-in one that comes with OS X.

RichVel commented 11 years ago

I found that on OS X Lion 10.7, using the default system Python (2.7.1), arch -i386 python main.py did not help with this error - running python main.py to test. I"m using Pyglet 1.1.4.

However, defaults write com.apple.versioner.python Prefer-32-Bit -bool yes does work. No need to install another version of Python, and this should also work for Mountain Lion 10.8.

I will do a pull request for the README to mention this.

Probably best to re-open this issue as the suggestions above don't yet fix it - testing by more people is required to be sure of which incantation to recommend.