Note that I've also done the following:

sudo pip uninstall pyglet

sudo pip install hg+https://pyglet.googlecode.com/hg/

Even after this I can't run the test.. it just hangs up

python tests/test.py

Test results are saved in log file: pyglet.2.log

------------------------------------------------------------------------------

Running Test: top.IMPORT (1/135)


    Test that all public modules are accessible after importing just 
'pyglet'.

    

    This _must_ be the first test run.

    

------------------------------------------------------------------------------

Running Test: app.EVENT_LOOP (2/135)


    Test that the event loop can do timing.

    

    The test will display a series of intervals, iterations and sleep times.

    It should then display an incrementing number up to 2x the number of

    iterations, at a rate determined by the interval.

    

Test interval=1, iterations=5, sleep=0

Test interval=1, iterations=5, sleep=0.5

10

Test interval=0.01, iterations=50, sleep=0

100

Test interval=0.02, iterations=50, sleep=0

100

Test interval=0.05, iterations=50, sleep=0

Test interval=0.05, iterations=50, sleep=0.03

Test interval=0.1, iterations=50, sleep=0

Test interval=0.1, iterations=50, sleep=0.05

5 Failures and 0 Errors detected.

------------------------------------------------------------------------------

Running Test: graphics.GRAPHICS_ALLOCATION (3/135)


Note: Graphics tests fail with recent nvidia drivers

      due to reordering and optimisation of vertices

      before they are placed in the feedback queue.

------------------------------------------------------------------------------

Running Test: graphics.IMMEDIATE (4/135)


10 Failures and 0 Errors detected.

------------------------------------------------------------------------------

Running Test: graphics.IMMEDIATE_INDEXED (5/135)


    

    

10 Failures and 0 Errors detected.

------------------------------------------------------------------------------

Running Test: graphics.RETAINED (6/135)


10 Failures and 0 Errors detected.

------------------------------------------------------------------------------

Running Test: graphics.RETAINED_INDEXED (7/135)


    

    

10 Failures and 0 Errors detected.

------------------------------------------------------------------------------

Running Test: graphics.MULTITEXTURE (8/135)


    Draws a full-window quad with two texture units enabled and multi

    texcoords.  Texture unit 0 is a checker pattern of yellow and cyan with

    env mode replace.  Texture unit 1 is a checker pattern of cyan and 
yellow,

    with env mode modulate.  The result should be flat green (with some 
variation

    in the center cross).

    

    The test will correctly detect the asbence of multitexturing, or if 
texture

    coords are not supplied for a unit, but will still pass if the texture

    coordinates for each unit are swapped (the tex coords are identical).

    

------------------------------------------------------------------------------

Running Test: window.WINDOW_OPEN (9/135)


    Test that a window can be opened.

    

    Expected behaviour: 

        One small window will be opened coloured purple.

    

        Close the window or press ESC to end the test.

    

Press return to begin test...



On Monday, October 20, 2014 12:09:01 AM UTC-4, Shady El Damaty wrote:
>
> Hello,
>
> I am trying to use pyglet with psychopy to create a psychology experiment 
> but am running into all sorts of issues.
>
> I used macports to install python2.6 and psychopy in 
> /opt/local/bin/python2.6 on OS X 10.9
>
> I'm running everything in pyCharm using the python interperter in 
> /opt/local/bin.  
>
> I've also installed pyglet 1.2alpha1 and updated XQuartz to the newest 
> version.
>
> If I try to run 
>
> from pyglet.window import Window
>
> I see that python tries to launch but nothing happens.
>
> Typing 
>
> from pyglet import app
> app.run()
>
> Just freezes up the terminal (the prompt disappears)
>
> All I want is for this simple code to run:
> from psychopy import core, visual
> import pyglet
>
> #Create a window
> win = visual.Window([400,300])
> #Create a stimulus for a certain window
> message = visual.TextStim(win, text='Hello World!')
> # Draw the stimulus to the window
> message.draw()
> # Flip backside of the window
> win.flip()
> #Pause 5s so you get a chance to see it
> core.wait(5.0)
>
> But I get this error message:
> /opt/local/bin/python2.6 
> /Users/shadyeldamaty/PycharmProjects/ultimatgame/psypy1.py
> /Users/shadyeldamaty/.local/lib/python2.6/site-packages/psychopy/visual/helpers.py:176:
>  
> FutureWarning: comparison to `None` will result in an elementwise object 
> comparison in the future.
>   if color==None:
> Traceback (most recent call last):
>   File "/Users/shadyeldamaty/PycharmProjects/ultimatgame/psypy1.py", line 
> 14, in <module>
>     win = visual.Window([400,300])
>   File 
> "/Users/shadyeldamaty/.local/lib/python2.6/site-packages/psychopy/visual/window.py",
>  
> line 320, in __init__
>     self._setupGL()
>   File 
> "/Users/shadyeldamaty/.local/lib/python2.6/site-packages/psychopy/visual/window.py",
>  
> line 1338, in _setupGL
>     self._setupPyglet()
>   File 
> "/Users/shadyeldamaty/.local/lib/python2.6/site-packages/psychopy/visual/window.py",
>  
> line 1212, in _setupPyglet
>     self._hw_handle=self.winHandle._window.value
> AttributeError: 'CocoaWindow' object has no attribute '_window'
> 1.6892 WARNING Creating new monitor...
> 1.6894 WARNING Creating new monitor...
>
> Process finished with exit code 1
>
> I've tried running the above code in 32bit mode in Canopy with arch -386 
> python and this doesn't work either.
>
> from pyglet import app
>
> app.run()
> ---------------------------------------------------------------------------
> ImportError                               Traceback (most recent call last)
> <ipython-input-14-810b1526bc66> in <module>()
> ----> 1 app.run()
>
> /Users/shadyeldamaty/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pyglet/__init__.py
>  
> in __getattr__(self, name)
>     304 
>     305             import_name = 'pyglet.%s' % self._module_name
> --> 306             __import__(import_name)
>     307             module = sys.modules[import_name]
>     308             object.__setattr__(self, '_module', module)
>
> /Users/shadyeldamaty/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pyglet/app/__init__.pyc
>  
> in <module>()
>     289 
>     290     if sys.platform == 'darwin':
> --> 291         from pyglet.app.carbon import CarbonEventLoop as EventLoop
>     292     elif sys.platform in ('win32', 'cygwin'):
>     293         from pyglet.app.win32 import Win32EventLoop as EventLoop
>
> /Users/shadyeldamaty/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pyglet/app/carbon.py
>  
> in <module>()
>      42 
>      43 from pyglet.app import windows, BaseEventLoop
> ---> 44 from pyglet.window.carbon import carbon, types, constants, _oscheck
>      45 
>      46 EventLoopTimerProc = ctypes.CFUNCTYPE(None, ctypes.c_void_p, 
> ctypes.c_void_p)
>
> /Users/shadyeldamaty/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pyglet/window/__init__.py
>  
> in <module>()
>    1667     # Try to determine which platform to use.
>    1668     if sys.platform == 'darwin':
> -> 1669         from pyglet.window.carbon import CarbonPlatform, 
> CarbonWindow
>    1670         _platform = CarbonPlatform()
>    1671         Window = CarbonWindow
>
> /Users/shadyeldamaty/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pyglet/window/carbon/__init__.py
>  
> in <module>()
>      47 from pyglet.window import WindowException, Platform, Display, 
> Screen,      48     BaseWindow, MouseCursor, DefaultMouseCursor, 
> _PlatformEventHandler
> ---> 49 from pyglet.window import key
>      50 from pyglet.window import mouse
>      51 from pyglet.window import event
>
> ImportError: cannot import name key 
>
>
> Can you please help me debug why pyglet will not work on my system and if 
> possible how to get the psychopy script above to work?  I've been working 
> on this issue for about 8 hours now and have tried everything I could find 
> online.  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to