Opened 4 years ago
Last modified 15 months ago
#62200 assigned defect
py39-pyglet on new mac M1: import pyglet.window fails
Reported by: | gitmbgit | Owned by: | stromnov (Andrey Stromnov) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | bigsur arm64 | Cc: | |
Port: | py-pyglet |
Description (last modified by jmroot (Joshua Root))
New M1 MacBookPro running BigSur 11.2 with fresh install of macports and all python packages installed via macports:
% port installed py39-pyglet The following ports are currently installed: py39-pyglet @1.5.14_0 (active) % python3.9 -c 'import pyglet.window' Traceback (most recent call last): File "<string>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyglet/window/__init__.py", line 1888, in <module> from pyglet.window.cocoa import CocoaWindow as Window File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyglet/window/cocoa/__init__.py", line 44, in <module> from pyglet.canvas.cocoa import CocoaCanvas File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyglet/canvas/__init__.py", line 102, in <module> from pyglet.canvas.cocoa import CocoaDisplay as Display File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyglet/canvas/cocoa.py", line 41, in <module> from pyglet.libs.darwin.cocoapy import CGDirectDisplayID, quartz, cf File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyglet/libs/darwin/__init__.py", line 36, in <module> from .cocoapy import * File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyglet/libs/darwin/cocoapy/__init__.py", line 32, in <module> from .runtime import objc, send_message, send_super File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1189, in <module> class DeallocationObserver_Implementation: File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1195, in DeallocationObserver_Implementation def initWithObject_(self, cmd, anObject): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1125, in decorator self.add_method(f, name, encoding) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1106, in add_method imp = add_method(self.objc_cls, name, method, encoding) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 655, in add_method imp = cfunctype(method) MemoryError
Also tried in python3.8 -- same outcome. Other python graphics packages (matplotlib, pyopengl, pyobjc, tk_inter) seem to work.
Might be related to the fact that pyglet/libs/darwin/cocoapy/runtime.py refers to /usr/lib/libobjc.dylib on line 56 but no such file exists.
Change History (3)
comment:1 Changed 4 years ago by jmroot (Joshua Root)
Description: | modified (diff) |
---|
comment:2 Changed 4 years ago by gitmbgit
comment:3 Changed 4 years ago by gitmbgit
Digging deeper, this seems to be a problem with ctypes.CFUNCTYPE
in both cases.
Note: See
TracTickets for help on using
tickets.
same problem also arises in py38-llvmlite: