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 4 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 install all optional dependencies available on conda-forge. Use the new `pybamm-base` conda
Saransh-cpp marked this conversation as resolved.
Show resolved Hide resolved
package to install pybamm with only the required dependencies. ([conda-forge/pybamm-feedstock#70](https://github.com/conda-forge/pybamm-feedstock/pull/70))
Saransh-cpp marked this conversation as resolved.
Show resolved Hide resolved
- 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: 13 additions & 11 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 tool. You can then “activate”
Saransh-cpp marked this conversation as resolved.
Show resolved Hide resolved
the environment using:

.. code:: bash

Expand All @@ -64,27 +65,25 @@ 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``. On macOS, it is necessary
to install the `SUNDIALS <https://computing.llnl.gov/projects/sundials/>`__
Saransh-cpp marked this conversation as resolved.
Show resolved Hide resolved
library beforehand.

.. tab:: GNU/Linux

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

.. code:: bash

pip install pybamm

.. tab:: macOS

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

.. 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,12 +100,15 @@ 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Users can install ``iree`` (for MLIR just-in-time compilation) to use for main expression evaluation in the IDAKLU solver. Requires ``jax``.
At the moment, PyBaMM's conda-forge distribution does not include the ``IDAKLUSolver``.
Saransh-cpp marked this conversation as resolved.
Show resolved Hide resolved

.. code:: bash

Expand Down
38 changes: 13 additions & 25 deletions docs/source/user_guide/installation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,30 @@ 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 part of the `Anaconda <https://docs.continuum.io/anaconda/>`_ distribution and is available as a conda package through the conda-forge channel.
Saransh-cpp marked this conversation as resolved.
Show resolved Hide resolved

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.
At the moment, PyBaMM's conda-forge distribution does not include the `IDAKLUSolver <../../api/solvers/idaklu_solver.html#idaklu-solver>`_.
Saransh-cpp marked this conversation as resolved.
Show resolved Hide resolved

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

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

.. tab:: macOS
The ``pybamm-base`` package installs PyBaMM only with its `required dependencies <index.html#install-required-dependencies>`_.

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

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

.. 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
22 changes: 17 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 tool. You can then “activate”
Saransh-cpp marked this conversation as resolved.
Show resolved Hide resolved
the environment using:

.. code::

Expand All @@ -56,12 +57,21 @@ 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

pip install pybamm
.. tab:: conda

PyBaMM’s dependencies (such as ``numpy``, ``scipy``, etc) will be
installed automatically when you install PyBaMM using ``pip``.
.. 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 +87,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