Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Dynamic library not found

In order to use a LabJack U3 for an experiment, I installed the U3 library. The library is installed in /usr/local/lib.

But in the console, when I try to import the u3 module, the import fails because the library is not found. How can I tell OpenSesame to search libraries in /usr/local/lib?

(I'm on macOS 11.2.3 with OpenSesame 3.8.8).

<code>from psychopy.hardware.labjacks import U3

---------------------------------------------------------------------------

ModuleNotFoundError           Traceback (most recent call last)

/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/psychopy/hardware/labjacks.py in <module>()

   14 try:

---> 15  from labjack import u3

   16 except ImportError:


ModuleNotFoundError: No module named 'labjack'


During handling of the above exception, another exception occurred:


ModuleNotFoundError           Traceback (most recent call last)

<ipython-input-9-292ea8406e52> in <module>()

----> 1 from psychopy.hardware.labjacks import U3


/Applications/OpenSesame.app/Contents/Resources/lib/python3.7/site-packages/psychopy/hardware/labjacks.py in <module>()

   15  from labjack import u3

   16 except ImportError:

---> 17  import u3

   18 # Could not load the Exodriver driver

   19 #  "dlopen(liblabjackusb.dylib, 6): image not found"


ModuleNotFoundError: No module named 'u3'

</code>

Comments

  • Solved. I needed to install the python the LabJackPython library in OpenSesame and all is fine.The LabJack works perfectly and I could turn on and off leds for the experiment.

  • Hi @emasesnepo , great! And thanks for reporting the solution!

    Did you like my answer? Feel free to Buy Me A Coffee :)

Sign In or Register to comment.