psychopy.org | Reference | Downloads | Github

OSError: cannot load the library [SOLVED]

Version: PsychoPy 3.03b
OS: macOS HighSierra Version 10.13.6
I was trying to run my experiment in local (which works fine in Py2) and I get this error message:

Running: /Users/utente/Documents/Studio rt NN/tempi risposta NN_lastrun.py

IT LOADED YAYTraceback (most recent call last):
File “/Users/utente/Documents/Studio rt NN/tempi risposta NN_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/python2.7/psychopy/sound/init.py”, line 79, in
from . import backend_sounddevice as backend
File “/Applications/PsychoPy3.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/PsychoPy3.app/Contents/Resources/lib/python2.7/cffi/api.py”, line 141, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python2.7/cffi/api.py”, line 802, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python2.7/cffi/api.py”, line 797, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library ‘/Applications/PsychoPy3.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib’: dlopen(/Applications/PsychoPy3.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib, 2): no suitable image found. Did find:
/Applications/PsychoPy3.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/PsychoPy3.app/Contents/Resources/lib/python2.7/site-packages.zip/soundfile/_soundfile_data/libsndfile.dylib’

Did anyone experience the same problem? What should I do?
Thanks in advance.

1 Like

The latest release of Py3 - 3.0.0.b7 solved the problem.
Thanks for your work.

1 Like

Were you trying to run the html export on your local? I am trying to do that.