Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update conda installation + minor fixes #4667

Merged
merged 8 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

## Breaking changes

- The conda distribution (`pybamm`) now installs all optional dependencies available on conda-forge. Use the new `pybamm-base` conda
package to install PyBaMM with only the required dependencies. ([conda-forge/pybamm-feedstock#70](https://github.com/conda-forge/pybamm-feedstock/pull/70))
- Separated extrapolation options for `pybamm.BoundaryValue` and `pybamm.BoundaryGradient`, and updated the default to be "linear" for the value and "quadratic" for the gradient. ([#4614](https://github.com/pybamm-team/PyBaMM/pull/4614))
- Double-layer SEI models have been removed (with the corresponding parameters). All models assume now a single SEI layer. ([#4470](https://github.com/pybamm-team/PyBaMM/pull/4470))

Expand Down
24 changes: 14 additions & 10 deletions docs/source/user_guide/installation/gnu-linux-mac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ To create a virtual environment ``env`` within your current directory type:

virtualenv env

You can then “activate” the environment using:
or use any of your preferred environment management tools. You can then “activate”
the environment using:

.. code:: bash

Expand All @@ -64,27 +65,28 @@ the environment and go back to your original system, just type:

deactivate

PyBaMM can be installed via pip. On macOS, it is necessary to install the `SUNDIALS <https://computing.llnl.gov/projects/sundials/>`__
PyBaMM can be installed via ``pip`` or ``conda``.
library beforehand.

.. tab:: GNU/Linux

In a terminal, run the following command:
.. tab:: pip

.. code:: bash

pip install pybamm

.. tab:: macOS
.. tab:: conda

.. note::

In a terminal, run the following command:
At the moment, PyBaMM's conda-forge distribution does not include ``IDAKLUSolver``.

.. code:: bash

pip install pybamm
conda install -c conda-forge pybamm-base

PyBaMM’s required dependencies (such as ``numpy``, ``casadi``, etc) will be
installed automatically when you install PyBaMM using ``pip``.
PyBaMM’s `required dependencies <index.html#install-required-dependencies>`_
(such as ``numpy``, ``casadi``, etc) will be installed automatically when you
install ``pybamm`` using ``pip`` or ``pybamm-base`` using ``conda``.

For an introduction to virtual environments, see
(https://realpython.com/python-virtual-environments-a-primer/).
Expand All @@ -101,6 +103,8 @@ Users can install ``jax`` and ``jaxlib`` to use the Jax solver.

The ``pip install "pybamm[jax]"`` command automatically downloads and installs ``pybamm`` and the compatible versions of ``jax`` and ``jaxlib`` on your system.

PyBaMM's full `conda-forge distribution <index.html#installation>`_ (``pybamm``) includes ``jax`` and ``jaxlib`` by default.

.. _optional-iree-mlir-support:

Optional - IREE / MLIR support
Expand Down
37 changes: 14 additions & 23 deletions docs/source/user_guide/installation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,33 @@ Installation
PyBaMM is available on GNU/Linux, MacOS and Windows.
It can be installed using ``pip`` or ``conda``, or from source.

.. tab:: GNU/Linux and Windows
.. tab:: pip

.. tab:: pip
PyBaMM can be installed via pip from `PyPI <https://pypi.org/project/pybamm>`__.

PyBaMM can be installed via pip from `PyPI <https://pypi.org/project/pybamm>`__.
.. code:: bash

.. code:: bash
pip install pybamm

pip install pybamm
.. tab:: conda

.. tab:: conda
PyBaMM is available as a ``conda`` package through the conda-forge channel.

PyBaMM is part of the `Anaconda <https://docs.continuum.io/anaconda/>`_ distribution and is available as a conda package through the conda-forge channel.
The ``pybamm`` package on conda-forge installs PyBaMM with all the `required and optional dependencies <index.html#dependencies>`_ available on conda-forge.

.. code:: bash
.. note::

conda install -c conda-forge pybamm
At the moment, PyBaMM's conda-forge distribution does not include ``IDAKLUSolver``.

.. tab:: macOS
.. code:: bash

.. tab:: pip
conda install -c conda-forge pybamm

PyBaMM can be installed via pip from `PyPI <https://pypi.org/project/pybamm>`__.
The ``pybamm-base`` package installs PyBaMM only with its `required dependencies <index.html#install-required-dependencies>`_.

.. code:: bash
.. code:: bash

pip install pybamm


.. tab:: conda

PyBaMM is part of the `Anaconda <https://docs.continuum.io/anaconda/>`_ distribution and is available as a conda package through the conda-forge channel.

.. code:: bash

conda install -c conda-forge pybamm
conda install -c conda-forge pybamm-base


Optional solvers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Ensure Docker installation by running:

.. code:: bash

docker --version
docker --version

Pulling the Docker image
------------------------
Expand Down
26 changes: 21 additions & 5 deletions docs/source/user_guide/installation/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ type:

python -m virtualenv env

You can then “activate” the environment using:
or use any of your preferred environment management tools. You can then “activate”
the environment using:

.. code::

Expand All @@ -56,12 +57,25 @@ the environment and go back to your original system, just type:

PyBaMM can be installed via pip:

.. code:: bash
.. tab:: pip

.. code:: bash

pip install pybamm

.. tab:: conda

pip install pybamm
.. note::

PyBaMM’s dependencies (such as ``numpy``, ``scipy``, etc) will be
installed automatically when you install PyBaMM using ``pip``.
At the moment, PyBaMM's conda-forge distribution does not include ``IDAKLUSolver``.

.. code:: bash

conda install -c conda-forge pybamm-base

PyBaMM’s `required dependencies <index.html#install-required-dependencies>`_
(such as ``numpy``, ``casadi``, etc) will be installed automatically when you
install ``pybamm`` using ``pip`` or ``pybamm-base`` using ``conda``.

For an introduction to virtual environments, see
(https://realpython.com/python-virtual-environments-a-primer/).
Expand All @@ -77,6 +91,8 @@ Users can install ``jax`` and ``jaxlib`` to use the Jax solver.

The ``pip install "pybamm[jax]"`` command automatically downloads and installs ``pybamm`` and the compatible versions of ``jax`` and ``jaxlib`` on your system.

PyBaMM's full `conda-forge distribution <index.html#installation>`_ (``pybamm``) includes ``jax`` and ``jaxlib`` by default.

Uninstall PyBaMM
----------------

Expand Down
Loading