Hello,
Any help with this problem would be greatly appreciated! I downloaded PsychoPy on a new desktop and tried to run a task, but received the error below about audio libraries. However, my task does not have any need for an audio library or sound. Is there a way to get around this error so that my task will run? See error below:
2.0132 ERROR Failed to load any of the audioLibs: [‘ptb’]. Falling back to PsychToolbox (‘ptb’) backend for sound. Be sure to add ‘ptb’ to preferences to avoid seeing this message again.
Traceback (most recent call last):
2.0173 ERROR No audioLib could be loaded. Tried: [‘ptb’]
Check whether the necessary audioLibs are installed.
File “/Users/johnw/Downloads/Allison_RFT_task/FINAL_RFT_Task_Updated2025-02-18-25_lastrun.py”, line 25, in
I’m having this exact same issue. I just installed on my lab Macs and can’t run any task of any kind because of this error. If anyone knows the fix, it would be really helpful right now. I didn’t have to install anything extra on my PC laptop to run things, so I have no idea what’s going wrong.
Hi all, just wanted to share a solution that finally worked for me in case it helps others!
I was running into persistent errors with PsychoPy’s audio backends (e.g., sounddevice, pyo, and even ptb) on my MacBook, and none of the audio libraries would load properly — even though my task didn’t always use audio. The task would crash or hang regardless.
I’m on a 2022 MacBook Air with the M2 chip (macOS Monterey), and it turned out to be a compatibility issue between my system and newer versions of PsychoPy + NumPy.
Here’s what versions worked for me:
Use these specific versions:
Python: 3.9.6
NumPy: 1.26.4
PsychoPy: 2023.2.3 (installed via pip)
You can create a virtual environment and install exact versions like this: