# Problem creating visual.Window() in Spyder (python 3.6) psychopy 1.90.1 pyglet\>1.3.0b1

**URL:** <https://discourse.psychopy.org/t/problem-creating-visual-window-in-spyder-python-3-6-psychopy-1-90-1-pyglet-1-3-0b1/4378>\
**Category:** Coding\
**Tags:** spyder\
**Created:** [April 18, 2018, 8:08pm UTC](https://discourse.psychopy.org/t/problem-creating-visual-window-in-spyder-python-3-6-psychopy-1-90-1-pyglet-1-3-0b1/4378 "2018-04-18T20:08:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjwilli58](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@tjwilli58](https://discourse.psychopy.org/u/tjwilli58)\
**Post date:** [April 18, 2018, 8:08pm UTC](https://discourse.psychopy.org/t/problem-creating-visual-window-in-spyder-python-3-6-psychopy-1-90-1-pyglet-1-3-0b1/4378/1 "2018-04-18T20:08:41Z")

</div>

Not sure if this is a bug report for PsychoPy - more of an FYI on what I’ve found:

I’m having a problem simply creating a Window from inside Spyder. After a little digging, I found that the problem is with pyglet versions \> 1.3.0b1. Here’s what I get

```auto
Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 6.1.0 -- An enhanced Interactive Python.

from psychopy import visual

win=visual.Window()
Traceback (most recent call last):

  File "<ipython-input-2-24b96ad64581>", line 1, in <module>
    win=visual.Window()

  File "C:\Users\timothy.j.williams1\Anaconda3\lib\site-packages\psychopy\visual\window.py", line 375, in __init__
    self.backend = backends.getBackend(win=self, *args, **kwargs)

  File "C:\Users\timothy.j.williams1\Anaconda3\lib\site-packages\psychopy\visual\backends\ __init__.py", line 32, in getBackend
    return Backend(win, *args, **kwargs)

  File "C:\Users\timothy.j.williams1\Anaconda3\lib\site-packages\psychopy\visual\backends\pygletbackend.py", line 102, in __init__
    allScrs = defDisp.get_screens()

  File "C:\Users\timothy.j.williams1\Anaconda3\lib\site-packages\pyglet\canvas\base.py", line 65, in get_screens
    raise NotImplementedError('abstract')

NotImplementedError: abstract

```

I was getting ready to post this before looking into pyglet, then I tried it from a PowerShell terminal (cmd terminals are disabled), and it worked fine. Everything is also fine with my python 2.7 environment (psychopy version 1.85.3, pyglet 1.2.4). I haven’t tried different pyglet versions there.

---

<div class="post-metadata">

**Author:** ![tjwilli58](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@tjwilli58](https://discourse.psychopy.org/u/tjwilli58)\
**Post date:** [April 18, 2018, 8:13pm UTC](https://discourse.psychopy.org/t/problem-creating-visual-window-in-spyder-python-3-6-psychopy-1-90-1-pyglet-1-3-0b1/4378/2 "2018-04-18T20:13:37Z")

</div>

pyglet 1.3.2 works fine in my python 2.7 environment.

---

<div class="post-metadata">

**Author:** ![HSBang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/hsbang/32/2466_2.png) [@HSBang](https://discourse.psychopy.org/u/HSBang)\
**Post date:** [April 19, 2018, 5:00pm UTC](https://discourse.psychopy.org/t/problem-creating-visual-window-in-spyder-python-3-6-psychopy-1-90-1-pyglet-1-3-0b1/4378/3 "2018-04-19T17:00:32Z")

</div>

I have the same problem.

I tried to downgrade pyglet on py Python 3.6 env, but it automatically downgrade Python too.

---

<div class="post-metadata">

**Author:** ![tjwilli58](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@tjwilli58](https://discourse.psychopy.org/u/tjwilli58)\
**Post date:** [April 19, 2018, 6:09pm UTC](https://discourse.psychopy.org/t/problem-creating-visual-window-in-spyder-python-3-6-psychopy-1-90-1-pyglet-1-3-0b1/4378/4 "2018-04-19T18:09:27Z")

</div>

I didn’t have that problem. How did you reinstall pyglet? Here’s what I did:

```auto
PS L:\> C:\Users\timothy.j.williams1\Anaconda3\python.exe -m pip install pyglet==1.3.0b1
Collecting pyglet==1.3.0b1
  Cache entry deserialization failed, entry ignored
  Using cached https://files.pythonhosted.org/packages/f1/d2/185f9b7a60d65a5d287d65e15c0f52e4f611fd651618a2f0e6387931889
5/pyglet-1.3.0b1-py2.py3-none-any.whl
Requirement already satisfied: future in c:\users\timothy.j.williams1\anaconda3\lib\site-packages (from pyglet==1.3.0b1)
 (0.16.0)
Installing collected packages: pyglet
  Found existing installation: pyglet 1.3.2
    Uninstalling pyglet-1.3.2:
      Successfully uninstalled pyglet-1.3.2
Successfully installed pyglet-1.3.0b1

```

---

<div class="post-metadata">

**Author:** ![fenbukaide](https://avatars.discourse-cdn.com/v4/letter/f/439d5e/32.png) [@fenbukaide](https://discourse.psychopy.org/u/fenbukaide)\
**Post date:** [April 28, 2018, 4:07pm UTC](https://discourse.psychopy.org/t/problem-creating-visual-window-in-spyder-python-3-6-psychopy-1-90-1-pyglet-1-3-0b1/4378/6 "2018-04-28T16:07:57Z")

</div>

I have the some problem.  
Python 3.6.1, Psychopy 1.90.1, pyglet 1.3.1

If I downgrade pyglet to 1.3.0, it works fine. Hopefully psychopy experts can fix it soon.
