Installation#

bw_timex is a Python software package. It’s available via pip and conda / mamba.

Note

bw_timex depends on Brightway25, and will install bw25-compatible versions of the bw packages. This means that it cannot be added to existing environments that are based on Brightway2, e.g., environments containing Activity Browser.

Installing bw_timex using pip#

  1. Install python from the website, your system package manager, or Homebrew.

  2. Create a directory for your virtual environments, such as C:/Users/me/virtualenvs/.

  3. In a console or terminal window, create a new virtual environment:

python -m venv C:/Users/me/virtualenvs/timex
  1. Activate the virtual environment. The exact syntax depends on your operating system; it will look something like:

source C:/Users/me/virtualenvs/timex/bin/activate # Linux/macOS
# or: C:\Users\me\virtualenvs\timex\Scripts\activate # Windows
  1. Install bw_timex:

pip install bw_timex pypardiso

You can also use pip to install useful libraries like jupyterlab.

Note

Fast calculations need SuiteSparse through scikit-umfpack. This background library can be installed via homebrew, as shown in this section, or via conda or mamba, as shown below.

  1. Install python from Homebrew.

  2. Install the requirements for SuiteSparse via homebrew:

brew install swig suite-sparse
  1. In a terminal window, create a directory for your virtual environments. This can be anywhere; we will use the home directory here as an example:

cd
mkdir virtualenvs
  1. Create and activate a virtualenv:

python -m venv virtualenvs/timex
source virtualenvs/timex/bin/activate
  1. Install bw_timex:

pip install bw_timex scikit-umfpack

You can also use pip to install useful libraries like jupyterlab.

Installing bw_timex using conda or mamba#

Prerequisites

  1. A working installation of conda or mamba. If you are using conda, we recommend installing the libmamba solver.

  2. Basic knowledge of Conda environments

  1. Create a new Conda environment with bw_timex:

conda create -n timex -c conda-forge -c cmutel -c diepers bw_timex
  1. Activate the environment:

conda activate timex
  1. (Optional but recommended) You can also use conda to install useful libraries like jupyterlab:

conda install -c conda-forge jupyterlab

Note

Brightway runs on the new Apple Silicon ARM architecture. However, the super-fast linear algebra software library pypardiso is not compatible with the ARM processor architecture. To avoid critical errors during instruction that would break core functionality, a different version of Brightway (brightway_nosolver) and a different linear algebra software library (scikit-umfpack) must be installed.

  1. Create a new Conda environment with bw_timex:

conda create -n timex -c conda-forge -c cmutel -c diepers bw_timex brightway25_nosolver numpy">=2" scikit-umfpack">=0.4.2"
  1. Activate the environment:

conda activate timex
  1. (Optional but recommended) You can also use conda to install useful libraries like jupyterlab:

conda install -c conda-forge jupyterlab