How to install Python package eelbrain on macOS

156 views Asked by At

I would like to run a TRF analysis in Python using the "eelbrain" package. I tried installing it in a new Anaconda Python environment and basically tried all possible ways of installing eelbrain (using the Terminal or the Anaconda Navigator GUI as described in the GitHub documentation), but none of it worked. The "solving package specifications" process just runs on and on until I end it. Ideally, I would like to use eelbrain in Spyder.

I saw here that there seem to be files for macOS on Conda Forge, but on eelbrain's GitHub page it says that macOS is no longer available on Conda Forge (if you look at the badges at the end of the README). My colleague was able to install eelbrain on his Windows PC, so I guess there's really a problem with macOS.

So long story short, my question is: Is it possible to install eelbrain on macOS—maybe without using Conda Forge—and if yes, how?

I have two devices I could use (one old iMac and a newer Macbook), here are the specs:

Device 1: iMac (mid 2015) with macOS Big Sur v.11.7.10, Anaconda Navigator 2.5.2, Spyder v.5.4.3 with Python 3.9.18

Device 2: Macbook Air M2 (2022) with macOS Sonoma v.14.2.1, Anaconda Navigator v.2.5.2, Spyder v.5.4.3 with Python 3.11.5

How can I solve this?

2

There are 2 answers

2
darked89 On

It seems that the eelbrain documentation contains the information on how to install it from GitHub: Installing [Eelbrain]. A branch from GitHub

The relevant content:

Download the environment file and create the eeldev conda environment:

$ curl -O https://raw.githubusercontent.com/christianbrodbeck/Eelbrain/master/env-dev.yml
$ conda env create --file=env-dev.yml

Activate the environment:

$ conda activate eeldev

Install the relevant development branch into the environment. If installing a specific branch, replace "master" with the branch name:

$ pip install https://github.com/christianbrodbeck/Eelbrain/archive/master.zip

    NOTE: In order for this to work on macOS, the Xcode Command Line Tools need to be installed. If they are not, the pip install command will fail with a long error message including fatal error: 'stdio.h' file not found. In order to install the Command Line Tools, run:

    $ xcode-select --install

I assume xcode-select --install should be done first.

0
Merle On

I tried installing it on a MacBook Pro M2 today (Anaconda 2.5.2 with Spyder 5.4.3 and Python 3.11.5) and pip installing eelbrain worked there without any of the problems I had on the other devices.

When I tried to import eelbrain in Spyder, I got some error messages because there were dependencies missing (nibabel, wx AKA wxPython, colormath, and pymatreader), but I also pip installed them and now it seems to work. At least I can import eelbrain and load a test dataset.

I hope this works now, but I still don't understand why it didn't work on my other devices.