| Reference | Downloads | Github

Pyo not installed


I just installed psychopy 1.84.2 on two (as far as I can tell) identical computers running windows 7. On machine 1 it looks okay after first testing, on machine 2 I receive the error message that pyo is not installed.

coder -> Demos -> says:
pyo [ not installed ]

builder -> Demos -> word_naming says:
AttributeError: No audio API found. Try installing pyo 0.6.8+, or pygame 1.8+

coder -> Shell

import pyo
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\", line 21, in <module>
    import pyolib.analysis as analysis
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyolib\", line 30, in <module>
    from _core import *
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyolib\", line 32, in <module>
    from _pyo import *
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.

Any idea what’s wrong with this installation? I tried it several times, no success.

Thanks in advance, yours

Hi Sven,

I had a similar problem / same error message. After googling previous psychopy mails, I found the solution below and it seems to be working. I am using the Builder and the solution is achieved in the Coder view. I compiled the script of the psyexp file and then deleted the sound component from the line where it is imported (from psychopy import …). Then I run the experiment from the Coder view and it works.

I am not using any audio stimuli so this solution worked for me but it may not be the ideal way if one has audio stimuli.

Hope this helps.


1 Like

Hi Ahu,
thanks for your reply. Unfortunately, I need the sound-component since we use sound-stimuli.

Thanks - Sven

Try changing your audio backend to use pysoundcard instead of pyo in the psychopy preferences?

Hi Jon,
thanks for your help, but I don’t understand your suggestion.
In the psychopy preferences I find “audio library” and “audio driver”. If the ‘audio backend’ in your post is “audio library” in the preferences, then I see the options ‘pyo’ and ‘pygame’. That corresponds to the documentation at What is pysoundcard?

I tried to swap pyo and pygame -> no success.
I tried to permute ‘Primary Sound’, ‘ASIO’ and ‘Audigy’ -> no success.
I always receive the error message saying I shall install pyo or gygame. But pyo is installed after a fresh installation of the StandalonePsychopy-1.84.2-win32.

Any other idea?

Thanks in advance - Sven

pysoundcard is an additional library that has been added recently, as an alternative to pyo and pygame. You can put it first in that list in your preferences to give it a shot and see if it works for you.

Hi Daniel,

simply adding ‘pysoundcard’ to the list of audio libraries in the preferences dialog gives an error message “RuntimeError: Invalid device” when trying to play a sound.

Thanks for your help - Sven

Looks like pysoudncard can’t talk to your soundcard. Maybe the same is true of pyo and that makes PsychoPy think that it hasn’t been installed.
Could the issue be to do with the sound card on the computer? Maybe check what it is, can you update its drivers? Is it playing sounds?!

The issue isn’t with PsychoPy per se (it’s to do with your computer and portaudio accessing the sound card) and I’m afraid I don’t know enough to help you.

Hello, this discussion is more than one year old, I know, but the problem is solved and I want to let all others with the same problem know this:

The OS is Windows 10 64bit. Nevertheless, it is necessary to manually install the Microsoft Visual C++ 2010 x86 Redistributable, i. e. the 32bit version of the visual c++ library. After that install everything works fine.

Yours - Sven