====== Muse Software ====== This page describes my software setup to communicate with the [[https://choosemuse.com/|Muse]] brain-sensing headband. These instructions have only been lightly tested. ===== Overview ===== I am running the Muse software on a MacBook Pro (Retina, 13-inch, Early 2015). These notes apply to using the Muse LSL software to communicate with the Muse or Muse 2 using a BLED112 bluetooth USB dongle. Base software environment: * Mac OS Mojave (10.14.3) * Default Python 2.7, but Python 3.x preferred ===== To Install Python 3 ===== These instructions are based largely on [[https://docs.python-guide.org/starting/install3/osx/|Installing Python 3 on Mac OS X]] from [[https://docs.python-guide.org/|The Hitcher's Guide to Python]]. Open a terminal (e.g., iTerm) to run these commands. * Install XCode Command Line Tools following instructions at [[https://developer.apple.com/download/more/|More Downloads for Apple Developers]]. * Install [[https://brew.sh/|Homebrew]]((I am also using [[https://guide.macports.org/|Mac Ports]] to manage some software packages, which may cause conflicts with Homebrew.)) using the command: $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" * Adjust PATH, if necessary((Set ''export PATH="/usr/local/opt/python/libexec/bin:$PATH"'' in your Bash startup file, e.g., ''.bash_profile''.)). * Install Python using this command:((Python 3 is installed by default with this command.)) $ brew install python ===== Setup Virtual Environment ===== $ mkdir muse $ cd muse ==== Python 2 ==== $ virtualenv -p python2 py2 $ source py2/bin/activate ==== Python 3 ==== $ virtualenv -p python3 py3 $ source py3/bin/activate ==== When Done ==== When done working with muse, either close the terminal window, or deactivate the virtual environment with... $ deactivate ===== Install Muse LSL and Run a Streamer and a Viewer ===== Muse software is described at [[https://github.com/alexandrebarachant/muse-lsl|Muse LSL]]. $ pip install muselsl Plug in the Bluetooth USB (BLED112) dongle and turn on your Muse headband before running ''muselsl''. $ muselsl stream Open another terminal window, switch to the install directory, and run the visualizer: $ cd muse $ muselsl view -v 2 ===== What Could Go Wrong? ===== ==== Missing Packages ==== If some packages show up as missing when installing muselsl, install them manually: $ pip install nose coverage ==== Uninstalling a Distutils Package ==== If an old version of a package (e.g., scipy) was installed using (the old) distutils, the new version might have problems uninstalling it. In that case, use the ''--ignore-installed'' option: $ pip install --ignore-installed scipy ==== Some Dependent Packages Don't get Installed ==== If when installing scipy, it complains that matplotlib is not installed, then install it directly: $ pip install matplotlib ==== Permission Denied ==== If some packages cannot be installed in the virtual environment (or in the system environment), use ''--user'' to install them locally (in the user's ~/Library folder): $ pip install muselsl --user