Nathan
I'm having problems too. OSX 10.8.2
Apple supplied python 2.7.2
Installed the prerelease avbin version 11 package (second of your links below) 
after getting a False for 
print(pyglet.media.have_avbin) call.

Got this error message:
Last login: Mon Dec 10 06:52:46 on ttys001
GeoMacBkPro:~ georgewright$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyglet
>>> print(pyglet.version)
1.2alpha1
>>> print(pyglet.media.have_avbin)
Unexpected error loading library /usr/local/lib/libavbin.dylib: 
dlopen(/usr/local/lib/libavbin.dylib, 6): no suitable image found.  Did find:
        /usr/local/lib/libavbin.dylib: open() failed with errno=13
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/pyglet/__init__.py", line 338, in 
__getattr__
    __import__(import_name)
  File "/Library/Python/2.7/site-packages/pyglet/media/__init__.py", line 1469, 
in <module>
    import avbin
  File "/Library/Python/2.7/site-packages/pyglet/media/avbin.py", line 64, in 
<module>
    darwin='/usr/local/lib/libavbin.dylib')
  File "/Library/Python/2.7/site-packages/pyglet/lib.py", line 111, in 
load_library
    lib = ctypes.cdll.LoadLibrary(name)
  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(/usr/local/lib/libavbin.dylib, 6): no suitable image found.  
Did find:
        /usr/local/lib/libavbin.dylib: open() failed with errno=13
>>> 
What do you suggest?
Regards
George Wright

On 08/12/2012, at 9:03 PM, [email protected] wrote:

>   Today's Topic Summary
> Group: http://groups.google.com/group/pyglet-users/topics
> 
> Pepijn's Problem [1 Update]
> pyglet on Mac OS Mountain Lion? [7 Updates]
> Proposed Patch: Drag and Drop support for Windows [2 Updates]
> Can I open a pyglet window without the window taking focus? [1 Update]
> (0,0) at top left mode for 2D graphics [2 Updates]
>  Pepijn's Problem
> Nathan <[email protected]> Dec 07 11:31PM -0700  
> 
> Pepijn,
>  
> I started a new email thread to help you debug this problem (so it won't
> sort together with the other thread).
>  
> It looks like you need to install a newer version of AVbin. Either try the
> last release (version 10):
>  
> https://github.com/downloads/AVbin/AVbin/AVbin10.pkg
>  
> ...or the latest prerelease (which may work better):
>  
> https://github.com/downloads/AVbin/AVbin/AVbin11alpha4.pkg
>  
> Try installing one of those and then run the commands again.
>  
> ~ Nathan
>  
>  
>  
>  pyglet on Mac OS Mountain Lion?
> Nathan <[email protected]> Dec 07 10:58AM -0700  
> 
> > 1.1.4 through pyglet.org... Maybe i should've uninstalled that one before i
> > followed your steps. Not sure how to uninstall though. I looked through
> > their documentation but they only tell you how to install. Anyone any ideas?
>  
> Lets check to see if everything got upgraded like you expected. Try
> running python, and then running the following commands:
>  
> import pyglet
> print(pyglet.version)
> print(pyglet.media.have_avbin)
> print(pyglet.media.avbin.get_version())
>  
> For example, on one of my machines it looks like this:
>  
> $ python
> Python 2.7.2 (default, Jun 20 2012, 16:23:33)
> [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pyglet
> >>> print(pyglet.version)
> 1.2alpha1
> >>> print(pyglet.media.have_avbin)
> True
> >>> print(pyglet.media.avbin.get_version())
> 11
>  
>  
> > Also, can i use the stock python that comes with os x 10.8?
>  
> You can if you install the development version of pyglet from the mercurial
> repository.
>  
>  
> > Thanks for all the help here in any case!
>  
> I hope this helps. :-)
>  
> ~ Nathan
>  
> Steve Willis <[email protected]> Dec 07 10:28AM -0800  
> 
> I am using the latest development Pyglet from the mercurial repository on 
> OSX 10.8 without issue, aside from the need to suppress the Application 
> State file as described previously. I haven't run any tests outside of my 
> own project, but it seems to be very stable thus far.
>  
> Steve 
>  
> On Friday, December 7, 2012 10:58:41 AM UTC-7, Nathan wrote:
>  
> Nathan <[email protected]> Dec 07 11:49AM -0700  
> 
> > State file as described previously. I haven't run any tests outside of my
> > own project, but it seems to be very stable thus far.
>  
> > Steve
>  
> That is so weird that you have to suppress the creation of the 
> "~/Library/Saved
> Application State/org.python.python.savedState" directory. That directory
> exists on all my 10.8 installations, but has never caused a problem.
>  
> Does the problem occur even if you do a basic "hello world" pyglet app?
>  
> ~ Nathan
>  
> Steve Willis <[email protected]> Dec 07 11:20AM -0800  
> 
> Yes. In fact, I am very new to Pyglet, and initially encountered this issue 
> when trying the first "Hello, World" example in the Pyglet documentation. 
> The development version runs without error and the Python process is 
> running, but no window appears. After suppressing the creation of the 
> org.python.python.savedState file, everything has gone smoothly.
>  
> A little research tells me that this file, and the many others like it, are 
> part of the feature which can be configured with the "Close windows when 
> quitting an application" checkbox found in System Preferences | General. In 
> my case, checking this box did not solve the problem by itself, but the 
> file is related to this feature allowing for OSX to restore the window 
> state and open documents within for compliant applications.
>  
> I have also observed that this file is not created immediately in all 
> cases. Before suppressing the creation of the file by locking permissions 
> on the Application State folder (disabling this feature for all other 
> applications as well), I tried manually deleting it while developing a 
> simple test application. In some cases, it was several minutes before the 
> file was created. In some cases I could even launch my application again 
> after its creation, but not consistently. The only method that has proved 
> reliable is to avoid creating the file in the first place.
>  
> One final tidbit: I also tried simply checking for the existence of this 
> file and deleting it when found as the first task in my Python script. This 
> did not work. As a result, I suspect that the file is created at the time 
> Pyglet is initialized on import, and not necessarily at the time a window 
> is actually displayed. 
>  
> Steve
>  
> On Friday, December 7, 2012 11:49:39 AM UTC-7, Nathan wrote:
>  
> Phillip Nguyen <[email protected]> Dec 07 02:50PM -0600  
> 
> Wow, thanks! With this information I found the ApplePersistenceIgnoreState 
> key, and I've committed a fix that should prevent the 
> org.python.python.savedState file from ever being created or used. This fixes 
> the problem of new windows not being displayed after finishLaunching got 
> called. It also explains why the problem was only showing up with certain 
> builds of python and not pypy. There is an Xcode build setting that can be 
> checked to prevent automatic state restoration for the application and I'm 
> guessing the python from python.org doesn't have this set.
>  
> When you run a pyglet program from the terminal, there is a warning message 
> saying that it won't be saving or restoring state. But I think I can live 
> with that.
>  
> --phillip
>  
>  
> Pepijn Gooiker <[email protected]> Dec 07 04:54PM -0600  
> 
> Hey Nathan,
>  
> This is the output when i run said commands:
>  
> Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) 
> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pyglet
>  
> >>> print(pyglet.version)
> 1.2alpha1
>  
> >>> print(pyglet.media.have_avbin)
> 2012-12-07 14:52:34.051 Python[414:f07] ApplePersistenceIgnoreState: Existing 
> state will not be touched. New state will be written to 
> /var/folders/b6/wjplmbk94bd501nx2n40vzbr0000gn/T/org.python.python.savedState
> Unexpected error loading library /usr/local/lib/libavbin.dylib: 
> dlopen(/usr/local/lib/libavbin.dylib, 6): no suitable image found. Did find:
> /usr/local/lib/libavbin.dylib: no matching architecture in universal wrapper
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "pyglet/__init__.py", line 338, in __getattr__
> __import__(import_name)
> File "pyglet/media/__init__.py", line 1469, in <module>
> import avbin
> File "pyglet/media/avbin.py", line 64, in <module>
> darwin='/usr/local/lib/libavbin.dylib')
> File "pyglet/lib.py", line 111, in load_library
> lib = ctypes.cdll.LoadLibrary(name)
> File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py",
>  line 443, in LoadLibrary
> return self._dlltype(name)
> File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py",
>  line 365, in __init__
> self._handle = _dlopen(self._name, mode)
> OSError: dlopen(/usr/local/lib/libavbin.dylib, 6): no suitable image found. 
> Did find:
> /usr/local/lib/libavbin.dylib: no matching architecture in universal wrapper
>  
> >>> print(pyglet.media.avbin.get_version())
> Unexpected error loading library /usr/local/lib/libavbin.dylib: 
> dlopen(/usr/local/lib/libavbin.dylib, 6): no suitable image found. Did find:
> /usr/local/lib/libavbin.dylib: no matching architecture in universal wrapper
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "pyglet/__init__.py", line 338, in __getattr__
> __import__(import_name)
> File "pyglet/media/__init__.py", line 1469, in <module>
> import avbin
> File "pyglet/media/avbin.py", line 64, in <module>
> darwin='/usr/local/lib/libavbin.dylib')
> File "pyglet/lib.py", line 111, in load_library
> lib = ctypes.cdll.LoadLibrary(name)
> File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py",
>  line 443, in LoadLibrary
> return self._dlltype(name)
> File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py",
>  line 365, in __init__
> self._handle = _dlopen(self._name, mode)
> OSError: dlopen(/usr/local/lib/libavbin.dylib, 6): no suitable image found. 
> Did find:
> /usr/local/lib/libavbin.dylib: no matching architecture in universal wrapper
>  
> Any idea what's happening?
>  
> Thanks
> Pepijn
>  
> ________________________________________
> From: [email protected] [[email protected]] On Behalf 
> Of Nathan [[email protected]]
> Sent: Friday, December 07, 2012 9:58 AM
> To: [email protected]
> Subject: Re: pyglet on Mac OS Mountain Lion?
>  
> On Thu, Dec 6, 2012 at 4:39 PM, pepijn 
> <[email protected]<mailto:[email protected]>> wrote:
> Hey Nathan/all,
>  
> Thanks for outlining these steps. Unfortunately i'm still getting the same 
> quick time errors as Steve Willis above. I had previously installed Pyglet 
> 1.1.4 through pyglet.org... Maybe i should've uninstalled that one before i 
> followed your steps. Not sure how to uninstall though. I looked through their 
> documentation but they only tell you how to install. Anyone any ideas?
>  
> Lets check to see if everything got upgraded like you expected. Try running 
> python, and then running the following commands:
>  
> import pyglet
> print(pyglet.version)
> print(pyglet.media.have_avbin)
> print(pyglet.media.avbin.get_version())
>  
> For example, on one of my machines it looks like this:
>  
> $ python
> Python 2.7.2 (default, Jun 20 2012, 16:23:33)
> [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pyglet
> >>> print(pyglet.version)
> 1.2alpha1
> >>> print(pyglet.media.have_avbin)
> True
> >>> print(pyglet.media.avbin.get_version())
> 11
>  
> Also, can i use the stock python that comes with os x 10.8?
>  
> You can if you install the development version of pyglet from the mercurial 
> repository.
>  
> Thanks for all the help here in any case!
>  
> I hope this helps. :-)
>  
> ~ Nathan
>  
> --
> You received this message because you are subscribed to the Google Groups 
> "pyglet-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/pyglet-users?hl=en.
>  
> Nathan <[email protected]> Dec 07 11:26PM -0700  
> 
> Awesome! Thanks for fixing that, Phillip.
>  
> ~ Nathan
>  
>  
>  
>  Proposed Patch: Drag and Drop support for Windows
> Nathan <[email protected]> Dec 07 11:11AM -0700  
> 
> I'd welcome the feature. I don't yet know enough Cocoa to figure out how
> to implement it myself, though.
>  
> ~ Nathan
>  
>  
>  
> Richard Jones <[email protected]> Dec 08 09:33AM +1100  
> 
> I recall implementing it for Carbon but I don't have the experience with
> Cocoa at this point.
>  
> Sent from my portable device, please excuse the brevity.
>  
>  Can I open a pyglet window without the window taking focus?
> Nathan <[email protected]> Dec 07 11:09AM -0700  
> 
> I would guess it should be possible assuming Windows 7 allows opening a
> window in the background. That's OS-specific behavior, obviously. I
> personally know very little about programming on MS Windows windowing
> systems.
>  
> ~ Nathan
>  
>  
>  
>  (0,0) at top left mode for 2D graphics
> anatoly techtonik <[email protected]> Dec 07 06:03AM -0800  
> 
> I've noticed that pyglet uses bottom left corner as (0,0) origin. This 
> creates problems with code ported from pygame, processing and other 
> applications from 2D graphics world where things are traditionally drawn 
> from top to bottom.
>  
> Is it possible to define a pyglet mode, where Y axes starts from the top?
>  
> Anonymouse <[email protected]> Dec 07 05:09PM +0100  
> 
> It is possible to make your own on_resize function that uses the top-right
> corner as the origin - it's simply a matter of OpenGL projection matrix.
>  
> You'll want something like this...
> @window.event
> def on_resize(width, height):
> glViewport(0, 0, width, height)
> glMatrixMode(GL_PROJECTION)
> glLoadIdentity()
> glOrtho(0, width, height, 0, 0.1, 1000)
>  
> Not tested but I think it should be right.
>  
>  
>  
> You received this message because you are subscribed to the Google Group 
> pyglet-users.
> You can post via email.
> To unsubscribe from this group, send an empty message.
> For more options, visit this group.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "pyglet-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/pyglet-users?hl=en.

George Wright
[email protected]



-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to