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#
Install
pythonfrom the website, your system package manager, or Homebrew.Create a directory for your virtual environments, such as
C:/Users/me/virtualenvs/.In a console or terminal window, create a new virtual environment:
python -m venv C:/Users/me/virtualenvs/timex
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
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.
Install
pythonfrom Homebrew.Install the requirements for
SuiteSparseviahomebrew:
brew install swig suite-sparse
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
Create and activate a virtualenv:
python -m venv virtualenvs/timex
source virtualenvs/timex/bin/activate
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
A working installation of
condaormamba. If you are usingconda, we recommend installing the libmamba solver.Basic knowledge of Conda environments
Create a new Conda environment with
bw_timex:
conda create -n timex -c conda-forge -c cmutel -c diepers bw_timex
Activate the environment:
conda activate timex
(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.
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"
Activate the environment:
conda activate timex
(Optional but recommended) You can also use conda to install useful libraries like
jupyterlab:
conda install -c conda-forge jupyterlab