Psychopy3 missing statistics module

I was creating my visual search task experiment on Builder interface of Psychopy. But then when I tried to move it online I realised I needed to have to on PsychoPy3. So I uploaded my psyexp document on Psychopy3 but now it is not running and I get this error:

File “/Users/veronika/.psychopy3/versions/psychopy/visual/”, line 16, in
from statistics import mean
ModuleNotFoundError: No module named ‘statistics’

Experiment ended.

Do you know why that is? This script runs okay on Psychopy but throws this error when i try to run it on Psychopy3.

Thank you

If you want it to run online then you aren’t going to be able to use that statistics module anyway.

Locally you should probably use np.average and online you’ll need to use average as defined in code_JS as per my crib sheet.

This error is not actually arising from @vhadjipanayi’s experiment, but from PsychoPy’s own code (in the file). This means that the statistics module is somehow not available, and pretty much no experiment will run.

Are you using the standalone application version of PsychoPy? If so, it should come bundled with the statistics module. If you are using your own custom Python installation, then it seems like you need to install the statistics module into it. But as I think this module is part of the Python standard library, its absence seems very strange indeed.

Thank you for your reply. So what should I do to make the experiment run on Psychopy3 and then online?

You could try reinstalling PsychoPy.