I am trying to install v1.78.00 in order to build my experiments in a way that’s compatible with other computers in the lab. I just cannot figure out what to do after saving the .tar.gz file (or should I be saving the .zip?) Please help. I am using windows 10. Sorry if it’s a stupid question.
Hi Joyce, have you considered running the latest version of PsychoPy but using the psychopy.useVersion() function so that the experiment itself is executed under the specified earlier version?
I have tried this on my 1.85.2 (not the latest, I know, but it is also supposed to be working?)
Here are the first few lines of my code
from __future__ import absolute_import, division
import psychopy
psychopy.useVersion('1.78.00')
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging
And the error message is
Traceback (most recent call last):
File “C:\Joyce\WM\Pilot1\Dotstest2.py”, line 14, in
psychopy.useVersion(‘1.78.00’)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\tools\versionchooser.py”, line 80, in useVersion
raise ValueError(msg.format(requestedVersion))
ValueError: Unknown version 1.78.00
I’d suggest you try something like this to see what is available to you:
from psychopy import tools
tools.versionchooser.availableVersions(local = True) # what exists here now
tools.versionchooser.availableVersions(local = False) # see what can be downloaded
For me, I see just one version currently available locally (the latest), but a full list including 1.78.00 available remotely (i.e. by automatic download from GitHub). The ability to call up older versions relies on having the git version control system installed, but I think you would have received an error message about that if you don’t.
Using the code you posted above (but in a Python 2 installation of the latest PsychoPy), I got this result:
>>> import psychopy
>>> psychopy.useVersion('1.78.00')
Downloading the PsychoPy Library from Github (may take a while)
git clone -o github https://github.com/psychopy/versions versions
Cloning into 'versions'...
remote: Counting objects: 3995, done.
remote: Total 3995 (delta 0), reused 0 (delta 0), pack-reused 3995
Receiving objects: 100% (3995/3995), 4.76 MiB | 887.00 KiB/s, done.
Resolving deltas: 100% (2660/2660), done.
'1.78.00'
which completed in just a few seconds. After that, the list of locally-available versions had expanded to match the list of remote versions.
()
################### Running: C:\Joyce\WM\Pilot1\Dotstest2.py ###################
Downloading the PsychoPy Library from Github (may take a while)
git clone -o github GitHub - psychopy/versions: This is for use by psychopy.useVersion() not for development of code versions
Cloning into ‘versions’…
pyo version 0.8.0 (uses single precision)
Traceback (most recent call last):
File “C:\Joyce\WM\Pilot1\Dotstest2.py”, line 15, in
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging
ImportError: cannot import name locale_setup
()
What does this mean?
Edit:
Deleted locale_setup, had another error about an argument
################### Running: C:\Joyce\WM\Pilot1\untitled.py ####################
pyo version 0.8.0 (uses single precision)
C:\Users\skhmy\AppData\Roaming\psychopy2\versions\psychopy\gui.py:45: wxPyDeprecationWarning: Using deprecated class PySimpleApp.
app = wx.PySimpleApp()
Traceback (most recent call last):
File “C:\Joyce\WM\Pilot1\untitled.py”, line 63, in
blendMode=‘avg’, useFBO=True)
TypeError: init() got an unexpected keyword argument ‘useFBO’
Proceeded to delete the use FBO argument, had another error message about the blendMode argument
So… does it mean that I have to re-write the code in 1.78.00 style?
Inevitably, any features added after v 1.7.8 can’t be used if the code is running under version 1.78.
Note that useVersion() can actually specify a future version, but I think that function was itself only introduced in version 1.85 (i.e. from version 1.85 onwards, you can actually run code that relies on the latest PsychoPy API, by calling useVersion() and specifying 'latest' or some other modern version).