brightway-lca / brightway2

Metapackage for brightway2 imports and documentation
https://brightway.dev/
BSD 3-Clause "New" or "Revised" License
100 stars 37 forks source link

Unable to install brightway2 using conda #46

Closed michaelweinold closed 2 years ago

michaelweinold commented 2 years ago

Installation according to documentation:

conda create -n bw2 -c conda-forge -c cmutel brightway2 jupyterlab

returns

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: \ 
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 openssl conflicts for:
jupyterlab -> python[version='>=3.7'] -> openssl[version='>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1i,<1.1.2a|>=1.1.1j,<1.1.2a|>=1.1.1l,<1.1.2a|>=1.1.1n,<1.1.2a|>=1.1.1o,<1.1.2a|>=3.0.3,<4.0a0|>=3.0.2,<4.0a0|>=3.0.0,<4.0a0|>=1.1.1m,<1.1.2a|>=1.1.1k,<1.1.2a']
brightway2 -> python[version='>=3.9'] -> openssl[version='>=1.1.1g,<1.1.2a|>=1.1.1h,<1.1.2a|>=1.1.1i,<1.1.2a|>=1.1.1j,<1.1.2a|>=1.1.1l,<1.1.2a|>=1.1.1n,<1.1.2a|>=1.1.1o,<1.1.2a|>=3.0.3,<4.0a0|>=3.0.2,<4.0a0|>=3.0.0,<4.0a0|>=1.1.1m,<1.1.2a|>=1.1.1k,<1.1.2a']

Package python conflicts for:
brightway2 -> asteval[version='>=0.9.22'] -> python[version='3.9.*|>=3.10,<3.11.0a0|>=3.10,<3.11.0a0|>=3.6|>=3.7|>=3.8,<3.9.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.9,<3.10.0a0|>=3.6,<4.0|>=3.6,<3.9|>=3.4|>=2.7',build=*_cpython]
brightway2 -> python[version='>=3.9']

Package requests conflicts for:
brightway2 -> bw2data[version='>=3.6.2'] -> requests[version='>=2.25']
brightway2 -> requests

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

Installing just brightway2 into an arbitrary conda environment:

(bw2) michaelweinold@Michaels-MBP ~ % conda install -c cmutel brightway2

returns

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \ 
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

System: macOS Monterey, 12.4 (21F79) conda 4.13.0

michaelweinold commented 2 years ago

Workaround: follow installation instructions for macOS with M1 processors. Brightway cannot be installed using non-Rosetta2 conda?

michaelweinold commented 2 years ago

Related: efforts to release platform specific conda packages (pypardiso solver for Win platform, umfpack solver for macOS ARM64 platform):

https://github.com/brightway-lca/brightway2/issues/47 https://github.com/cmutel/conda-recipes/issues/6

cmutel commented 2 years ago

You can use the brightway2_nosolver and brightway25_nosolver packages to get Brightway without a specific solver, and then add pypardiso or scikit-umfpack as needed. Hopefully #47 will come soon and make the need for this shim go away, but each package needs an external conda forge review which can take time.

The documentation is updated.