"brightway2" pkg incompatible on macOS Apple M1?

238 Views Asked by At

I've been trying to install the "brightway2" pkg in my virtual environment with the latest version of miniconda for macOS M1 chip (Miniconda3 macOS Apple M1 64-bit bash) by following carefully the procedure (https://2.docs.brightway.dev/installation.html) but installation keeps failing due to conflicts.

When I insert this line conda install -y -q -c conda-forge -c cmutel brightway2 jupyterlab

The command outputs the following

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package python_abi conflicts for:
brightway2 -> python_abi=3.9[build=*_cp39]
brightway2 -> bw2analyzer[version='<0.10.99'] -> python_abi[version='3.10.*|3.7.*|3.8.*',build='*_cp37m|*_cp310|*_cp38']
jupyterlab -> ipython -> python_abi[version='3.10.*|3.8.*|3.9.*',build='*_cp310|*_cp38|*_cp39']

Package wheel conflicts for:
jupyterlab -> jupyter-packaging[version='>=0.7,<1'] -> wheel
python=3.9 -> pip -> wheel

Package jinja2 conflicts for:
jupyterlab -> jupyter_server[version='>=1.4,<2'] -> jinja2[version='>2.10*|>=3.0.3']
jupyterlab -> jinja2[version='>=2.1|>=2.10']

I tried multiple times different versions of python, tried to install with anaconda, other miniconda versions and even pip command but nothing does it... I also made sure to update conda before creating my virtual environement with the following:

./conda update conda

Anybody would know if this is a macOS M1 incompatibility or is there any way around those conflicts?

2

There are 2 best solutions below

4
On BEST ANSWER

We have added instructions for M1 Macs here: https://2.docs.brightway.dev/installation.html#installation-on-mac-m1

0
On

I am new to Brightway2 (and Python in general!). I have a MacBook Pro with an M1 Pro and I run through some problems when installing it. I followed the Brightway2 step-by-step guide for M1 Macs, and this is the error I kept having:

Intel MKL FATAL ERROR: This system does not meet the minimum requirements for use of the Intel(R) Math Kernel Library. 
The processor must support the Intel(R) Supplemental Streaming SIMD Extensions 3 (Intel(R) SSSE3) instructions. 
The processor must support the Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) instructions. 
The processor must support the Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions

However, I managed to make it work following this post by Alexb21 and his solution worked wonders for me:

Thanks that works now, however there were some typos and omissions for the installation command lines to be complete. Here are that the commands that worked for me: CONDA_SUBDIR=osx-64 conda create -n bw_rosetta python=3.9 conda activate bw_rosetta conda env config vars set CONDA_SUBDIR=osx-64 conda config --append channels conda-forge conda config --append channels cmutel conda install brightway2 scikit-umfpack conda remove pypardiso --force

At the end of his solution I also installed jupyterlab within the bw_rosetta environment, I tried installing ipykernel but it was not possible due to numerous conflicts.

I was wondering if this solution could be implemented/updated to the documentation for future M1 users.

Thank you to Chris Mutel and all people collaborating in this awesome project, and Alexb21 for his solution!