psychopy.org | Reference | Downloads | Github

Installation issue on new computer


#1

I am finding it impossible to run anything on one particular lab computer (even if I create a program from scratch and use the latest version). This is the error message generated. Any ideas? It is Windows XP so may be missing something somewhere?

Welcome to PsychoPy2!
v1.84.1
()
##### Running: D:\admin\Desktop\Mirror-touch screening stroop\MTS stroop.py #####
pyo version 0.8.0 (uses single precision)
Traceback (most recent call last):
  File "D:\admin\Desktop\Mirror-touch screening stroop\MTS stroop.py", line 59, in <module>
    blendMode='avg', useFBO=True)
  File "C:\Program Files\PsychoPy2\lib\site-packages\psychopy-1.84.1-py2.7.egg\psychopy\visual\window.py", line 340, in __init__
    self._setupGL()
  File "C:\Program Files\PsychoPy2\lib\site-packages\psychopy-1.84.1-py2.7.egg\psychopy\visual\window.py", line 1549, in _setupGL
    self._setupPyglet()
  File "C:\Program Files\PsychoPy2\lib\site-packages\psychopy-1.84.1-py2.7.egg\psychopy\visual\window.py", line 1403, in _setupPyglet
    style=style)
  File "C:\Program Files\PsychoPy2\lib\site-packages\pyglet\window\win32\__init__.py", line 131, in __init__
    super(Win32Window, self).__init__(*args, **kwargs)
  File "C:\Program Files\PsychoPy2\lib\site-packages\pyglet\window\__init__.py", line 559, in __init__
    self._create()
  File "C:\Program Files\PsychoPy2\lib\site-packages\pyglet\window\win32\__init__.py", line 263, in _create
    self.context.attach(self.canvas)
  File "C:\Program Files\PsychoPy2\lib\site-packages\pyglet\gl\win32.py", line 210, in attach
    raise gl.ContextException('Unable to share contexts')
pyglet.gl.ContextException: Unable to share contexts
Exception AttributeError: "'Window' object has no attribute 'useNativeGamma'" in <bound method Window.__del__ of <psychopy.visual.window.Window object at 0x14CD6AD0>> ignored

#2

Hello Jamie,

Seems like a GL bug. Did you install the latest drivers for your graphics card?


#3

Quite possibly, although I am told that OpenGL 2.0 isn’t compatible with Windows XP? Is anyone else out there running Psychopy on XP? If not, I guess its time to update this old testing computer!

I tried installing an older version of python (2.6.6) but that hasn’t cured it either.

Jamie


#4

This is from an old post by some one else. It’s not an issue with graphical driver. It may simply require changing the name of pyglet 1.1.4 to pyglet.

Try this:

  1. Go to “c:\Program Files (x86)\PsychoPy2\Lib\site-packages” and change the name of pyglet folder to pyglet1.2.
  2. Then change the name of pyglet1.1.4 to pyglet (this is the correct version of pyglet that should have been loaded, somehow the pyglet 1.2 alpha was chosen as the default instead.
  3. Benchmarking demo works again for me.

According to the PsychoPy installation documentation, pyglet version 1.1.4 is the one that is supported while you should NOT use the 1.2 version. However in the Standalone installations of psychopy (1.82.00 and 1.82.01 I tested so far) in the modules folder of psychopy (for me that would be on Windows 7 64 bit: “c:\Program Files (x86)\PsychoPy2\Lib\site-packages” the working pyglet module 1.1.4 was RENAMED to pyglet1.1.4 while the pyglet 1.2 alpha became the default ‘pyglet’ module.

I discovered this when going to code view and running the sysInfo.py demo.

I suggest that the pyglet 1.1.4 become the default again, and leave the 1.2alpha version out.

–Linus


#5

The advice from @mdc is good; it’s been said many times (https://www.google.co.uk/search?q=Unable+to+share+contexts+psychopy&oq=Unable+to+share+contexts+psychopy&aqs=chrome..69i57j0.4603j0j1&sourceid=chrome&ie=UTF-8)

Update your graphics card driver, from the website of the graphics card manufacturer (Intel, nVidia or AMD) to avoid Microsoft’s drivers.

XP is very definitely compatible with OpenGL 2 and above, it’s just that Microsoft haven’t always been very good at shipping support in their own drivers (hence the advice above).

Don’t change your installation of Python that won’t help.

Install the graphics card drivers. Graphics. Card. Drivers. If that really doesn’t work then you could update your graphics card itself, if this is not a laptop, but most likely the drivers.