Hello all.
I am teaching the new PsychoPy book (which is great b.t.w.) in a course with around 100 students. Several users, mostly Mac users, are running into problems when running PsychoPy. They cannot even run the simplest experiment, e.g. showing a default text component for 1 second. It seems like a common theme is that libraries are missing. Several students have tried more than one version of PsychoPy (e.g. 1.90.1 and 1.90.3) and several have also tried both Python 2 and Python 3 versions (standalone). I am at a loss, so below are some error messages from four users – but more had issues (e.g. a Windows user had an apparent problem with a different library). Any help would be greatly appreciated.
----- USER 1 -----
Macbook Pro, OS X El Capitan version 10.11.6
########## Running: /Users/Inga/Documents/PsychoPy/stroop_lastrun.py ########### Traceback (most recent call last):
File “/Users/Inga/Documents/PsychoPy/stroop_lastrun.py”, line 14, in
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging, clock
File “/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/sound/init.py”, line 79, in
from . import backend_sounddevice as backend
File “/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/sound/backend_sounddevice.py”, line 20, in
import soundfile as sf
File “soundfile/init.pyc”, line 1, in
File “soundfile/soundfile.pyc”, line 270, in
File “/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/cffi/api.py”, line 141, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File “/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/cffi/api.py”, line 802, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File “/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/cffi/api.py”, line 797, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library ‘/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib’: dlopen(/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib, 2): no suitable image found. Did find:
/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib: stat() failed with errno=20. Additionally, ctypes.util.find_library() did not manage to locate a library called ‘/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib’
----- USER 2 -----
Mac Os High Sierra, version 10.9.5
######## Running: /Users/gunnhildurgunnarsdottir/Desktop/sss_lastrun.py ######## Traceback (most recent call last):
File “soundfile.pyc”, line 142, in
OSError: sndfile library not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/Users/gunnhildurgunnarsdottir/Desktop/sss_lastrun.py”, line 14, in
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging, clock
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/sound/init.py”, line 79, in
from . import backend_sounddevice as backend
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/sound/backend_sounddevice.py”, line 20, in
import soundfile as sf
File “”, line 961, in _find_and_load
File “”, line 950, in _find_and_load_unlocked
File “”, line 646, in _load_unlocked
File “”, line 616, in _load_backward_compatible
File “soundfile.pyc”, line 156, in
File “posixpath.pyc”, line 78, in join
TypeError: expected str, bytes or os.PathLike object, not list
----- USER 3 -----
Unknown operating system
######### Running: /Users/karengeirsdottir/Documents/stroop_lastrun.py ######### Traceback (most recent call last):
File “/Users/karengeirsdottir/Documents/stroop_lastrun.py”, line 14, in
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging, clock
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/sound/init.py”, line 79, in
from . import backend_sounddevice as backend
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/sound/backend_sounddevice.py”, line 20, in
import soundfile as sf
File “soundfile/init.pyc”, line 1, in
File “soundfile/soundfile.pyc”, line 270, in
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/cffi/api.py”, line 141, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/cffi/api.py”, line 802, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/cffi/api.py”, line 797, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib’: dlopen(/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib, 2): no suitable image found. Did find:
/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib: stat() failed with errno=20. Additionally, ctypes.util.find_library() did not manage to locate a library called ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib’
----- USER 4 -----
MacBook pro, Unknown operating system
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/cffi/api.py”, line 802, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/cffi/api.py”, line 797, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib’: dlopen(/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib, 2): no suitable image found. Did find:
/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib: stat() failed with errno=20. Additionally, ctypes.util.find_library() did not manage to locate a library called ‘/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib’