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

Make pybamm_install_odes a bit more robust #3706

Merged
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: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Features

- The `pybamm_install_odes` command now includes support for macOS systems and can be used to set up SUNDIALS and install the `scikits.odes` solver on macOS ([#3417](https://github.com/pybamm-team/PyBaMM/pull/3417))
- The `pybamm_install_odes` command now includes support for macOS systems and can be used to set up SUNDIALS and install the `scikits.odes` solver on macOS ([#3417](https://github.com/pybamm-team/PyBaMM/pull/3417), [#3706](https://github.com/pybamm-team/PyBaMM/3706]))
- Added support for Python 3.12 ([#3531](https://github.com/pybamm-team/PyBaMM/pull/3531))
- Added method to get QuickPlot axes by variable ([#3596](https://github.com/pybamm-team/PyBaMM/pull/3596))
- Added custom experiment terminations ([#3596](https://github.com/pybamm-team/PyBaMM/pull/3596))
Expand Down
4 changes: 3 additions & 1 deletion docs/source/user_guide/installation/gnu-linux-mac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ Users can install `scikits.odes <https://github.com/bmcage/odes>`__ to utilize i

.. code:: bash

apt install libopenblas-dev
apt-get install libopenblas-dev
pip install wget cmake
pybamm_install_odes

system (under ``~/.local``), before installing ``scikits.odes``. (Alternatively, one can install SUNDIALS without this script and run ``pip install pybamm[odes]`` to install ``pybamm`` with ``scikits.odes``.)
Expand All @@ -131,6 +132,7 @@ Users can install `scikits.odes <https://github.com/bmcage/odes>`__ to utilize i
.. code:: bash

brew install openblas gcc gfortran
pip install wget cmake
pybamm_install_odes

The ``pybamm_install_odes`` command, installed with PyBaMM, automatically downloads and installs the SUNDIALS library on your
Expand Down
7 changes: 6 additions & 1 deletion pybamm/install_odes.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,12 @@ def main(arguments=None):
# see https://scikits-odes.readthedocs.io/en/latest/installation.html#id1
os.environ["SUNDIALS_INST"] = SUNDIALS_LIB_DIR
env = os.environ.copy()
subprocess.run(["pip", "install", "scikits.odes"], env=env, check=True)
logger.info("Installing scikits.odes via pip")
subprocess.run(
[f"{sys.executable}", "-m", "pip", "install", "scikits.odes", "--verbose"],
env=env,
check=True,
)


if __name__ == "__main__":
Expand Down
Loading