Repository navigation
Closed
Description
Hello,
I'm struggling to install brainiak on M3 Macbook. The conda option didn't work, throwing an error like:
Channels:
- brainiak
- defaults
- conda-forge
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- brainiak
Current channels:
- https://conda.anaconda.org/brainiak
- defaults
- https://conda.anaconda.org/conda-forge
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
The pip option didn't work either. I followed the steps listed here (https://brainiak.org/docs/installation.html#macos) for the prerequisite. All seemed working until the line of python3 -m pip install -U pip
The error was like:
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the package you are trying to
install.
If you wish to install a Python library that isn't in Homebrew,
use a virtual environment:
python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install xyz
If you wish to install a Python application that isn't in Homebrew,
it may be easiest to use 'pipx install xyz', which will manage a
virtual environment for you. You can install pipx with
brew install pipx
You may restore the old behavior of pip by passing
the '--break-system-packages' flag to pip, or by adding
'break-system-packages = true' to your pip.conf file. The latter
will permanently disable this error.
If you disable this error, we STRONGLY recommend that you additionally
pass the '--user' flag to pip, or set 'user = true' in your pip.conf
file. Failure to do this can result in a broken Homebrew installation.
Read more about this behavior here: <https://peps.python.org/pep-0668/>
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Any suggestion?
Metadata
Metadata
Assignees
Labels
No labels
Activity
poldrack commentedon Nov 23, 2024
same problem - bumping this.
songaeun commentedon Nov 24, 2024
I ended up installing Brainiak by directly cloning its GitHub repository. I’m sharing my solution here in case it helps other users.
Seems like the default setting of my M3 MacBook was slightly different from what the tutorial assumed. So I checked and adjusted several things:
The code I used:
I’m not entirely sure if this is efficient or recommendable approach, but it worked for me. But hope this helps anyone facing similar issues.
poldrack commentedon Nov 24, 2024
thanks! this worked for me as well - I used micromamba to set up the environment and had to change the pyproject.toml to deal with a python minor version mismatch:
but otherwise seems to import fine now.
mihaic commentedon Nov 25, 2024
@songaeun, thank you very much for posting your step-by-step guide. @poldrack, thank you for confirming the steps are working.
@davidt0x has recently revamped BrainIAK packaging in an amazing PR. Now we only need to get the package publishing going and installation should become much smoother.
davidt0x commentedon Dec 9, 2024
Hi @songaeun and @poldrack, we have a pre-view release up now for brainiak with wheels for ARM macs. It should be installable with something like:
pip install brainiak==0.12a5in a fresh python environment (Python 3.9 - 3.12). It shouldn't require setting up clang and such. If you have issues with mpi4py wheels then I think you can get them on macos like this:
python -m pip install mpi4py -i https://pypi.anaconda.org/mpi4py/simple(see here)If you need to actually use the MPI stuff in brainiak then you need to install an mpi implementation, either mpich or openmpi from brew\macports
If you prefer conda, there is also package (that includes mpi4py and mpich) that you can install with:
conda install -c brainiak -c conda-forge brainiak==0.12a5If either of you have the time it would be nice to know if these solutions work for you. Also, thanks again for posting your previous solutions.
songaeun commentedon Dec 10, 2024
Hi @davidt0x, both pip and conda install commands work on my m3 Macbook. Thank you so much for releasing these options!
davidt0x commentedon Dec 10, 2024
thanks for the quick feedback @songaeun!
mihaic commentedon Jan 9, 2025
The new BrainIAK v0.12 release supports M3. Thank you for your help with testing, @songaeun!