alexandrebarachant / muse-lsl

Python script to stream EEG data from the muse 2016 headset
BSD 3-Clause "New" or "Revised" License
628 stars 184 forks source link

Unable to launch muse-lsl on Mac Ventura #194

Open Tguyfr opened 1 year ago

Tguyfr commented 1 year ago

Hi there, I apologize in advance for my very dumb question, but I'm not familiar with Python. I installed a few librairies in the past and can run scripts from the Terminal, but that's it. I've been able to install muse-lsl with pip3, but not to launch it. It's in my /User/Python/3.7/lib/python/site-packages/ directory, so what ? I don't understand what to do next. I tried a bunch of things with no results. Help...

jdpigeon commented 1 year ago

Interesting. Installing and running should be as easy as:

pip install muselsl
muselsl stream 

Are you seeing any error messages in the terminal when trying to run muselsl?

Tguyfr commented 1 year ago

I reinstalled muselsl to be sure and get this answer : `Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pylsl/pylsl.py", line 1287, in libpath = next(find_liblsl_libraries()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/bin/muselsl", line 5, in from muselsl.main import main File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/muselsl/init.py", line 1, in from .stream import stream, list_muses File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/muselsl/stream.py", line 8, in from pylsl import StreamInfo, StreamOutlet File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pylsl/init.py", line 2, in from .pylsl import IRREGULAR_RATE, DEDUCED_TIMESTAMP, FOREVER, cf_float32,\ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pylsl/pylsl.py", line 1296, in raise RuntimeError(err_msg + __dload_msg) RuntimeError: LSL binary library file was not found. Please make sure that the binary file can be found in the package lib folder (/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pylsl/lib) or the system search path. Alternatively, specify the PYLSL_LIB environment variable. You can install the LSL library with conda: conda install -c conda-forge liblsl or with homebrew: brew install labstreaminglayer/tap/lsl or otherwise download it from the liblsl releases page assets: https://github.com/sccn/liblsl/releases On modern MacOS (>= 10.15) it is further necessary to set the DYLD_LIBRARY_PATH environment variable. e.g. `>DYLD_LIBRARY_PATH=/opt/homebrew/lib python path/to/my_lsl_script.py``

I reinstalled LSL via homebrew, but I don't understand how to set the PATH.

Tguyfr commented 1 year ago

Sorry, I don't even know ho to properly quote some code on Github :/