psychopy.org | Reference | Downloads | Github

Installing development versions of PsychoPy

OS (e.g. Win10): macOS Sierra
PsychoPy version (e.g. 1.84.x): 1.85
What are you trying to achieve?:
I’m interested in trying out the development build of 1.85. I’ve done a manual installation via pip, but this only lets me run psychopy scripts via the terminal. How can I see and use the GUI of the dev build of 1.85?

Best
Ian

The steps are:

  • pip uninstall psychopy (to get rid of your current one)
  • clone the git repository to somewhere, e.g. ~/code/psychopy
  • cd into that and do pip install -e psychopy

Using pip install -e <package> doesn’t copy the files into site-packages but adds pointers to your development folder. In future you can git clone pull to update your psychophy repository to the latest master and python import will use the update version.

Brilliant, this worked, thanks.

My next step was to try to build psychopy using py2app, so as to be able to try out PsychoJS from the builder. I have all dependencies installed. When I use “python setup.py py2app” I got the following error: "error: You must specify either app or plugin"
I overcame this by adding “app=[‘psychopy/app/psychopyApp.py’],” on line 56 of “setup.py”.

However, when I run again it now returns an AssertionError during the build. I haven’t come across this issue when looking up how to build psychopy, or in my googling around py2app errors.

Here’s end of the terminal output:


copying /usr/local/lib/libfreetype.6.dylib -> /Users/Ian/git/psychopy/dist/PsychoPy.app/Contents/Frameworks
copying /usr/local/lib/libpng16.16.dylib -> /Users/Ian/git/psychopy/dist/PsychoPy.app/Contents/Frameworks
Traceback (most recent call last):
File “setup.py”, line 80, in
‘Programming Language :: Python’],
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py”, line 151, in setup
dist.run_commands()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py”, line 953, in run_commands
self.run_command(cmd)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py”, line 972, in run_command
cmd_obj.run()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app/build_app.py”, line 659, in run
self._run()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app/build_app.py”, line 865, in _run
self.run_normal()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app/build_app.py”, line 959, in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app/build_app.py”, line 1214, in create_binaries
platfiles = mm.run()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/macholib/MachOStandalone.py”, line 138, in run
if node.rewriteLoadCommands(changefunc):
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/macholib/MachO.py”, line 109, in rewriteLoadCommands
if header.rewriteLoadCommands(*args, **kw):
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/macholib/MachO.py”, line 312, in rewriteLoadCommands
data = changefunc(filename)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/macholib/MachOStandalone.py”, line 129, in changefunc
rv = changemap.get(mm.locate(mm.trans_table.get((node.filename, path))))
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/macholib/MachOStandalone.py”, line 23, in locate
newname = super(FilteredMachOGraph, self).locate(filename, loader)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/macholib/MachOGraph.py”, line 42, in locate
assert isinstance(filename, (str, unicode))
AssertionError

Any advice?

You don’t need to use py2app at all and I’d recommend against it. I’d recommend you go to a terminal and type:

python $HOME/code/psychopy/git/psychopy/app/psychopyApp.py

or whatever the real path is to psychopyApp.py. I have this set up to use an alias of course so I just go to terminal and type psp to launch.

If you do want to use py2app then you need to use a different setup.py in the repository:
python setupApp.py py2app
but:

  1. you’re likely to get other errors and I don’t have time to talk you through them all
  2. you’ll have to repeat the build every time you change anything, which is painful
  3. you won’t easily distinguish the official, released version you have installed from the dev version, whereas this way it’s always clear which one you ran