Library not loaded on MacOS Mojave

We finally managed to made it work, here are the steps we followed:

  1. copy/paste libportaudio.2.dylib file* into /Applications/PsychoPy.app/Contents/Resources/lib/python3.8/pyo/ ==> it didn’t work but we had a different error message indicating that another library wasn’t loaded: @loader_path/libportmidi.dylib
  2. copy/paste libportmidi.dylib file* into /Applications/PsychoPy.app/Contents/Resources/lib/python3.8/pyo/ ==> it worked!

*Note: we copied the absent files from the other mac (MacOS Catalina 10.15.7) on which there were present and on which the experiment worked. The files were in /usr/local/Cellar/portaudio/19.20140130/lib/libportaudio.2.dylib and /usr/local/Cellar/portaudio/19.20140130/lib/libportaudio.dylib. You could either download them online.