[MacPorts] #62200: py39-pyglet on new mac M1: import pyglet.window fails
MacPorts
noreply at macports.org
Tue Feb 2 08:12:13 UTC 2021
#62200: py39-pyglet on new mac M1: import pyglet.window fails
------------------------+--------------------------
Reporter: gitmbgit | Owner: stromnov
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.4
Resolution: | Keywords: bigsur arm64
Port: py-pyglet |
------------------------+--------------------------
Description changed by jmroot:
Old description:
> 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.
New description:
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.
--
--
Ticket URL: <https://trac.macports.org/ticket/62200#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list