Skip to content

Commit

Permalink
Purge scikits.odes cached wheels when using pybamm_install_odes
Browse files Browse the repository at this point in the history
See discussion on #3785. This command exits with a warning if a cached wheel is not present, it does not raise an error and therefore should be safe to add within a subprocess.
  • Loading branch information
agriyakhetarpal committed Jan 30, 2024
1 parent 83e45cb commit 165ec43
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pybamm/install_odes.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ def main(arguments=None):
os.environ["SUNDIALS_INST"] = SUNDIALS_LIB_DIR
env = os.environ.copy()
logger.info("Installing scikits.odes via pip")
logger.info("Purging scikits.odes whels from pip cache if present")
subprocess.run(
[f"{sys.executable}", "-m", "pip", "cache", "remove", "scikits.odes"],
check=True,
)
subprocess.run(
[f"{sys.executable}", "-m", "pip", "install", "scikits.odes", "--verbose"],
env=env,
Expand Down

0 comments on commit 165ec43

Please sign in to comment.