psychopy.org | Reference | Downloads | Github

Spyder 3 released

ide
spyder
#1

Hello, I just wanted to inform you that recently, version 3 of the Spyder IDE has been released. It fixes numerous annoying bugs from the previous versions, and also looks much better. :wink:

It can be installed on Anaconda via

conda update qt pyqt
conda install spyder

The announcement can be found on GitHub.

#2

I wonder (I’ve been wondering for a while) whether we should add spyder as an additional view within PsychoPy so that people can install PsychoPy Standalone and use spyder from that. I remain concerned about its performance issues when running a script (I think/imagine this is overhead introduced by debugging thread) but it is sufficiently useful for development that many people would like it I think

6 Likes
#3

That would be really useful - I’ve been doing some development using the Standalone Psychopy and introducing (a version that is actually reliable of) Spyder with the PP libraries would be amazing

#4

This would be a great addition!

#5

As you probably know, @jon, I would love that. When teaching programming it’s very useful for subjects to have real-time debugging, documentation, etc. FWIW, while fooling around, I have not seen any effects on timing on visual stuff (setting parameters, drawing, etc.) in Spyder as compared to Coder and that’s probably the stuff which has to run most lines of code. It seems consistent within 0.1 ms. But there could be scenarios that we don’t know about.

I would be happy to do a more thorough test of spyder impact in performance.

#6

I think there’s a setting whether to auto-attach a debugger if an error occurs. Maybe that’s something worth looking into.

#7

Well, if someone wants to pick this up there are two potential ways it would work:

  • first step would be to find out how to launch spyder from within the PsychoPy application process, in which case we can create a menu item and try to launch it from the menu item. Problem: Our app is wxPython and Spyder is QT. It might not be possible to have both running in one process (both trying to dominate the event loop)
  • easier option is to launch spyder as a secondary process but then
    • it can’t pass messages easily back to the main app process
    • it will look like another app has opened in the dock etc

Either way, I think we might want to hack/override some of the spyder code to make it more PsychoPy friendly (like adding our demos menu etc)

#8

Actually, when I send a script to collaborators, it’s sometimes hard for them to find Coder. Builder view opens by default (at least on the first launch) and they then have to use a menu to go to what feels like a distinct application. So having it as a separate app in the dock and as two different apps and entries in the start menu may actually be user friendly? Then Spyder could be a third. Also, when do they have to pass messages to each other other than just Builder instructing Coder/Spyder to open a file on the disc? Spyder updates instantly if a file is changed on the disc.

I don’t know much about running in same/different processes. But running Spyder and Builder/Coder simultaneously is not a problem on my Ubuntu 16.04. Subjects probably wouldn’t run experiments on both of them simultaneously :wink:

1 Like
Install instructions for Spyder4 on PsychoPy3 on Windows
#9

I think the key test would be to test for dropped frames while drawing fairly intensively. e.g. find a number of dots for dotstim that doesn’t give many dropped frames from Coder and then test with Spyder
On my machine I actually get horrible lag on spdyer just from typing, but apparently that’s an issue they’ve fixed for PyQT5 (which I haven’t managed to install on my mac yet).

#10

I use PyCharm for development & debugging https://www.jetbrains.com/pycharm/. Tried Spyder long ago but find PyCharm works well for me (not sure where it falls on QT/wx divide).

But for Python teaching purposes, I’d really put in a strong recommendation for Rodeo https://www.yhat.com/products/rodeo

This isn’t as well-suited for full-on development (e.g. debugging). But it really shines as a data analysis environment. They’ve clearly been inspired by the RStudio IDE for R in terms of layout, but have produced something much cleaner and more minimalist. It has a pane for coding (and “Run” buttons) and a Python terminal. But like RStudio and Matlab, there is also a pane showing variables, which can be clicked on to inspect their contents. There are also panes for figures, documentation, the file system, command history, and so on.

So it is a very nice IDE for teaching Python programming for beginners, in the way it makes variables and their content more accessible and tangible (as it does for the file system). But for advanced users, it is an ideal environment for conducting data analysis. Worth trying out.

1 Like
#11

Hi @Michael, I also prefer PyCharm over Spyder (I think it’s sooo much superior in so many ways!), but I also think the switch from Matlab or RStudio to Spyder is easier for most users than the switch to PyCharm. (Actually I recommend all my lab colleagues to start with Spyder first, before switching to PyCharm)

Regarding Rodeo, I’ve been following its development for quite some time now, and I try it out every other month, only to be very disappointed every single time. There’s always bugs popping up for me, or fundamental features simply missing. It does look promising though, but I believe it needs a little more time to mature.

Regarding variable explorers, you also have that in Spyder and PyCharm, and it’s even going to improve with the next PyCharm release.