Unable to install on Apple Silicon Macs through Matlab Add-on

It’s my first time to download PTB.
I’m using Apple M2 (Sonoma 14.0) and Matlab2024b (Silicon/ARM version).
I installed Gstreamer 1.24.10 runtime installer.
After watching Celia’s video, I downloaded and installed PTB-3 through the Matlab add-on. However, the Screen() failed to work when I ran SetupPsychtoolbox.

And when I ran Screen('Preference', 'SkipSyncTests', 1);

I got the following error:

Invalid MEX-file '/Users/username/Library/Application Support/MathWorks/MATLAB
Add-Ons/Collections/Psychtoolbox-3/Psychtoolbox/PsychBasic/Screen.mexmaca64':
dlopen(/Users/subaozi/Library/Application Support/MathWorks/MATLAB
Add-Ons/Collections/Psychtoolbox-3/Psychtoolbox/PsychBasic/Screen.mexmaca64, 0x0006): Library not
loaded: @rpath/libLexActivator.dylib
  Referenced from: <FC3FD20F-B39D-3708-B81F-C2CA69017697> /Users/subaozi/Library/Application
  Support/MathWorks/MATLAB Add-Ons/Collections/Psychtoolbox-3/Psychtoolbox/PsychBasic/Screen.mexmaca64
  Reason: tried: '/Library/Frameworks/GStreamer.framework/Versions/Current/lib/libLexActivator.dylib'
  (no such file),
  '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/GStreamer.framework/Versions/Current/lib/libLexActivator.dylib'
  (no such file), '/Users/username/Library/Application Support/MathWorks/MATLAB
  Add-Ons/Collections/Psychtoolbox-3/Psychtoolbox/PsychBasic/PsychPlugins/libLexActivator.dylib' (no
  such file), '/Library/Frameworks/GStreamer.framework/Versions/Current/lib/libLexActivator.dylib' (no
  such file),
  '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/GStreamer.framework/Versions/Current/lib/libLexActivator.dylib'
  (no such file), '/Users/username/Library/Application Support/MathWorks/MATLAB
  Add-Ons/Collections/Psychtoolbox-3/Psychtoolbox/PsychBasic/PsychPlugins/libLexActivator.dylib' (no
  such file), '/Applications/MATLAB_R2024b.app/bin/maca64/libLexActivator.dylib' (no such file),
  '/Applications/MATLAB_R2024b.app/bin/maca64/./libLexActivator.dylib' (no such file),
  '/Applications/MATLAB_R2024b.app/bin/maca64/../../sys/os/maca64/libLexActivator.dylib' (no such
  file), '/Applications/MATLAB_R2024b.app/bin/maca64/libLexActivator.dylib' (no such file),
  '/Applications/MATLAB_R2024b.app/bin/maca64/./libLexActivator.dylib' (no such file),
  '/Applications/MATLAB_R2024b.app/bin/maca64/../../sys/os/maca64/libLexActivator.dylib' (no such
  file), '/Applications/MATLAB_R2024b.app/bin/maca64/../../runtime/maca64/libLexActivator.dylib' (no
  such file),
  '/Applications/MATLAB_R2024b.app/bin/maca64/../../sys/java/jre/maca64/jre/lib/server/libLexActivator.dylib'
  (no such file),
'/Applications/MATLAB_R2024b.app/bin/maca64/../../sys/java/jre/maca64/jre/lib/libLexActivator.dylib'
  (no such file)

I could not find the library (libLexActivator.dylib) and do not know whether I need to download it, and if yes, where to download it.

Just install via the instructions on the website.

My understanding is that the Matlab toolbox add-on route is broken due to the way in which it incorrectly setup the order of the installed files. Thus to be avoided.

I assume this is still the case as this route is no-longer stated on the website.

Peter

same issue, same error. i want to find the libLexActivator.dylib file but cant find it online. please update here if you figured this issue out

edit: i realized there is this downloadlexactivator.m in the psychtoolbox folder and i run it. it downloaded mac, linux and windows folders including the libLexActivator.dylib unzip the mac one, then if you set up psychtoolbox it runs. however psychtoolbox setup gave me a 30 day trial (don’t know why) should be free. another issue is the demos don’t work but my experiment code works fine

Please provide more information:

(1) Have you dowloaded in via the website and not as the Matlab toolbox file as per previous response? You do not say.
(2) Have you followed the installation instructions step by step?
(3) You will need to post some kind of error information: “the demos don’t work but my experiment code works fine” is not sufficient.
(4) PTB for macOS and Windows going forward will be a yearly subscription. This is due to the community not supporting PTB through the donation scheme (over many many years). There are a few threads on the forum about this.

P