Installation#
PyBaMM is available on GNU/Linux, MacOS and Windows.
It can be installed using pip
or conda
, or from source.
Optional solvers#
Following GNU/Linux and macOS solvers are optionally available:
scikits.odes -based solver, see Optional - scikits.odes solver.
jax -based solver, see Optional - JaxSolver.
Dependencies#
Required dependencies#
PyBaMM requires the following dependencies.
Package |
Minimum supported version |
---|---|
1.16.0 |
|
2.8.2 |
|
3.6.0 |
|
2023.04.0 |
Optional Dependencies#
PyBaMM has a number of optional dependencies for different functionalities. If the optional dependency is not installed, PyBaMM will raise an ImportError when the method requiring that dependency is called.
If using pip, optional PyBaMM dependencies can be installed or managed in a file (e.g. requirements.txt or setup.py)
as optional extras (e.g.,``pybamm[dev,plot]``). All optional dependencies can be installed with pybamm[all]
,
and specific sets of dependencies are listed in the sections below.
Plot dependencies#
Installable with pip install "pybamm[plot]"
Dependency |
Minimum Version |
pip extra |
Notes |
---|---|---|---|
2.9.0 |
plot |
For generating simulation GIFs. |
|
2.0.0 |
plot |
To plot various battery models, and analyzing battery performance. |
Pandas dependencies#
Installable with pip install "pybamm[pandas]"
Dependency |
Minimum Version |
pip extra |
Notes |
---|---|---|---|
0.24.0 |
pandas |
For data manipulation and analysis. |
Docs dependencies#
Installable with pip install "pybamm[docs]"
Dependency |
Minimum Version |
pip extra |
Notes |
---|---|---|---|
1.5.0 |
docs |
Sphinx makes it easy to create intelligent and beautiful documentation. |
|
- |
docs |
A clean, Bootstrap-based Sphinx theme. |
|
- |
docs |
A sphinx extension for designing. |
|
- |
docs |
To copy codeblocks. |
|
- |
docs |
For technical & scientific documentation. |
|
- |
docs |
Add inline tabbed content to your Sphinx documentation. |
|
- |
docs |
For BibTeX citations. |
|
- |
docs |
For re-building docs once triggered. |
Examples dependencies#
Installable with pip install "pybamm[examples]"
Dependency |
Minimum Version |
pip extra |
Notes |
---|---|---|---|
- |
examples |
For example notebooks rendering. |
Dev dependencies#
Installable with pip install "pybamm[dev]"
Dependency |
Minimum Version |
pip extra |
Notes |
---|---|---|---|
- |
dev |
For managing and maintaining multi-language pre-commit hooks. |
|
- |
dev |
For code formatting. |
Cite dependencies#
Installable with pip install "pybamm[cite]"
Dependency |
Minimum Version |
pip extra |
Notes |
---|---|---|---|
0.24.0 |
cite |
BibTeX-compatible bibliography processor. |
Latexify dependencies#
Installable with pip install "pybamm[latexify]"
Dependency |
Minimum Version |
pip extra |
Notes |
---|---|---|---|
1.8.0 |
latexify |
For symbolic mathematics. |
bpx dependencies#
Installable with pip install "pybamm[bpx]"
Dependency |
Minimum Version |
pip extra |
Notes |
---|---|---|---|
- |
bpx |
Battery Parameter eXchange |
tqdm dependencies#
Installable with pip install "pybamm[tqdm]"
Dependency |
Minimum Version |
pip extra |
Notes |
---|---|---|---|
- |
tqdm |
For logging loops. |
Jax dependencies#
Installable with pip install "pybamm[jax]"
Dependency |
Minimum Version |
pip extra |
Notes |
---|---|---|---|
0.4.8 |
jax |
For JAX solvers |
|
0.4.7 |
jax |
Support library for JAX |
odes dependencies#
Installable with pip install "pybamm[odes]"
Dependency |
Minimum Version |
pip extra |
Notes |
---|---|---|---|
- |
odes |
For scikits ODE & DAE solvers |
Note
Before running pip install "pybamm[odes]"
, make sure to install scikits.odes
build-time requirements as described here .
Full installation guide#
Installing a specific version? Installing from source? Check the advanced installation pages below