Skip to content

Commit

Permalink
Merge pull request #1041 from marc-vdm/update_bw2io_requirement
Browse files Browse the repository at this point in the history
Update Brightway2 requirement
  • Loading branch information
marc-vdm authored Oct 11, 2023
2 parents 1ba49e1 + 0b25a81 commit ce1582f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 40 deletions.
56 changes: 17 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ Please also read and cite our [scientific paper](https://doi.org/10.1016/j.simpa

# Contents
- [Installation](#installation)
- [The quick way](#the-quick-way)
- [The thorough way](#the-thorough-way)
- [Conda](#conda)
- [Install the AB with ecoinvent >=3.9](#install-the-ab-with-ecoinvent-39)
- [Install the AB with ecoinvent <3.9](#install-the-ab-with-older-ecoinvent-versions-39)
- [Updating the AB](#updating-the-ab)
- [Mamba](#mamba)
- [Updating the AB](#updating-the-ab)
- [Getting started](#getting-started)
- [Running the AB](#running-the-ab)
- [Importing LCI databases](#importing-lci-databases)
Expand All @@ -60,15 +54,20 @@ conda activate ab
activity-browser
```

## The thorough way
### Mamba

You can also install the AB using [Mamba](https://mamba.readthedocs.io/en/latest/mamba-installation.html#mamba-install):

| :warning: The activity browser has dropped support for python versions below `3.8`|
|---|
| You should re-install if you have an older installation of the activity browser which doesn't use `python >= 3.8` (you can check with `conda list` or `python --version` in your conda environment). You can remove your existing environment with `conda remove -n ab --all` or choose a new environment name (instead of `ab`). Re-installing will not affect your activity-browser/brightway projects. |
```bash
mamba create -n ab activity-browser
mamba activate ab
activity-browser
```

## The thorough way
### Conda

We recommend that you use **conda** to manage your python installation. You can install [Anaconda](https://www.anaconda.com/products/individual) or the more compact [miniconda](https://conda.io/miniconda.html) (Python 3 of course) for your operating system. Installation instructions for miniconda can be found [here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html). See also the [conda user guide](https://docs.conda.io/projects/conda/en/latest/user-guide/index.html) or the [Conda cheat sheet](https://docs.conda.io/projects/conda/en/latest/_downloads/843d9e0198f2a193a3484886fa28163c/conda-cheatsheet.pdf).
We recommend that you use **conda** to manage your python installation. You can install [Anaconda](https://www.anaconda.com/products/individual) or the more compact [miniconda](https://conda.io/miniconda.html) (Python 3 version) for your operating system. Installation instructions for miniconda can be found [here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html). See also the [conda user guide](https://docs.conda.io/projects/conda/en/latest/user-guide/index.html) or the [Conda cheat sheet](https://docs.conda.io/projects/conda/en/latest/_downloads/843d9e0198f2a193a3484886fa28163c/conda-cheatsheet.pdf).

Skip this step if you already have a working installation of anaconda or miniconda, but make sure to keep your conda installation up-to-date: `conda update conda`.

Expand All @@ -78,23 +77,13 @@ The activity-browser has many dependencies that are managed by the [conda-forge]
```bash
conda config --prepend channels conda-forge
```
### Install the AB with ecoinvent >=3.9
After prepending the Conda-Forge channel the following line should be executed within the command prompt/terminal to install the AB and it's dependencies.

```bash
conda create -n ab activity-browser
```
This will install the Activity Browser with the latest version of the Brightway2 libraries (currently excluding Brightway2.5 libraries).

### Install the AB with older ecoinvent versions (<3.9)

If you want to work with with older versions of ecoinvent (<3.9) in the AB, a different Biosphere3 database needs to be installed. This requires a _**different version of the bw2io library**_ to be installed, see also [here](https://github.com/brightway-lca/brightway2-io). Note that this version of bw2io can ONLY work with ecoinvent versions < 3.9. If you want to work with version > 3.9 AND < 3.9, the only solution currently available is to use two separate virtual environments (i.e. two AB installations).

To install a version of the AB that can handle ecoinvent versions <3.9, do the following: For a new installation from the conda-forge repository the same initial steps need to be made: Prepending the Conda-Forge repository in the channels, and installing the AB and dependencies. After the successful installation, the following two commands need to be executed before running the AB: <i>1)</i> Remove the latest version of the Brightway2 Input-Output library, <i>2)</i> Install an older version of the Brightway2 Input-Output library.
### Installing Activity Browser

```bash
conda remove --force bw2io
conda install bw2io=0.8.7
conda create -n ab -c conda-forge activity-browser
conda activate ab
activity-browser
```

#### Activity Browser is installed
Expand All @@ -110,16 +99,6 @@ conda activate ab
conda update activity-browser
```

## Mamba

You can also install the AB using [Mamba](https://mamba.readthedocs.io/en/latest/mamba-installation.html#mamba-install):

```bash
mamba create -n ab activity-browser
mamba activate ab
activity-browser
```

# Getting started

## Running the AB
Expand Down Expand Up @@ -173,7 +152,6 @@ These are the plugins that we know about. To add your plugin to this list either
| [Notebook](https://github.com/Pan6ora/ab-plugin-Notebook) | Use Jupyter notebooks from AB | [anaconda](https://anaconda.org/pan6ora/ab-plugin-template), [github](https://github.com/Pan6ora/ab-plugin-Notebook) | Rémy Le Calloch |
| [template](https://github.com/Pan6ora/activity-browser-plugin-template) | An empty plugin to start from | [anaconda](https://anaconda.org/pan6ora/ab-plugin-template), [github](https://github.com/Pan6ora/activity-browser-plugin-template) | Rémy Le Calloch |


## Installation

### detailed instructions
Expand Down Expand Up @@ -226,14 +204,14 @@ If you experience problems or are suffering from a specific bug, please [raise a
### Current main developers

- Bernhard Steubing (b.steubing@cml.leidenuniv.nl) (creator)
- Jonathan Kidner (j.h.kidner@cml.leidenuniv.nl) (lead developer)
- Marc van der Meide ([github]((https://github.com/marc-vdm))) (maintainer)

### Important contributers

- [Adrian Haas](https://github.com/haasad)
- [Chris Mutel](https://github.com/cmutel)
- [Daniel de Koning](https://github.com/dgdekoning)
- [Marc van der Meide](https://github.com/marc-vdm)
- [Jonathan Kidner](https://github.com/Zoophobus)
- [Remy le Calloch](https://remy.lecalloch.net)

# Copyright
Expand Down
2 changes: 1 addition & 1 deletion ci/recipe/stable/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ requirements:
run:
- python >=3.8,<3.10
- arrow
- brightway2 >=2.4.2
- brightway2 >=2.4.4
- pyperclip
- eidl >=1.4.2
- networkx
Expand Down

0 comments on commit ce1582f

Please sign in to comment.