Opened 3 years ago

Last modified 8 months ago

#62200 assigned defect

py39-pyglet on new mac M1: import pyglet.window fails — at Version 1

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 (1)

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Description: modified (diff)
Note: See TracTickets for help on using tickets.