Install PyBaMM
Set up a virtual environment
We strongly recommend installing PyBaMM inside a virtual environment so that it does not alter your system Python files.1
Create a virtual environment
Run the following command in the directory where you want to work:
2
Activate the environment
3
Install PyBaMM
4
Deactivate when done
For a primer on Python virtual environments, see Real Python — Python Virtual Environments.
Optional dependencies
You can install PyBaMM with optional extras depending on your use case:Optional — JAX solver
Installjax and jaxlib to use the JAX-based solver:
jax and jaxlib alongside PyBaMM.
The full conda-forge
pybamm package includes jax and jaxlib by default.Docker
ADockerfile is available in the PyBaMM repository for containerised environments.