question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create PyBaMM conda package

See original GitHub issue

Summary Make PyBaMM available as a conda package, for instance through conda-forge.

$ conda install -c conda-forge pybamm

I opened a PR to add PyBaMM to conda-forge, see conda-forge/staged-recipes#11046. It’s been reviewed quickly but now I’ve been waiting for the merge for a week. This should happen soon I hope 😃

Motivation The Anaconda and miniconda python distributions are widely used. Although the conda package manager now integrates fairly well with pip, installing PyBaMM through pip within an Anaconda environment may lead to dependencies issues and is discouraged. Furthermore, providing a conda package for PyBaMM would give Anaconda (or miniconda) users the possibility to install PyBaMM as they install any other conda package.

Additional context conda packages are built using conda-build, from a meta.yaml (also known as a recipe) file that describes the package: its source code, how to install and test it, and some metadata. These packages can technically be hosted and distributed from anywhere, but conda-forge serves as a central, community-driven repository for conda packages (a bit like PyPI for regular Python packages). To contribute a package to conda-forge, one must fork the conda-forge/staged-recipes repo, add the new recipe(s), and open a PR for the original repo. Upon the merge, the package is built and uploaded to anaconda.org/conda-forge.

Dependencies When building a conda package, all of its dependencies must also be available as conda packages. Between the anaconda and conda-forge channel, most of pybamm’s dependencies are statisfied, except anytree, scikit-fem and casadi. I built conda packages for anytree and scikit-fem, so these should also be available on conda-forge and therefore as PyBaMM dependencies once my PR is merged. The case of casadi remains only problematic for windows support, as casadi is already available on conda-forge but only for linux and macos. I considered building a conda package for casadi for Windows but quickly realised that it is not at all straightforward (this would require compiling a lot of C and the dependency chain looks fairly long!). Actually compiling casadi on windows is strongly discouraged. It’s a shame because Windows support was actually one of my main motivation for providing pybamm as a conda package.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
schatt89commented, Jun 29, 2020

I installed sundails and now everything works fine, thank you. Sorry for the slow response!

0reactions
tinosulzercommented, Feb 5, 2021

Oh I thought I read it could, never mind. Not a big deal about the idaklu solver, will close this one. Also not available through conda on windows, right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pybamm - :: Anaconda.org
conda install. To install this package run one of the following: conda install -c conda-forge pybamm. Description. By data scientists, for data scientists ......
Read more >
conda-forge/pybamm-feedstock - GitHub
conda -forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the...
Read more >
pyBAMM package not available in conda forge channel but its ...
PyBaMM is now available as a conda package through the conda-forge channel on Windows, macOS, and Linux. You can install it by using...
Read more >
Welcome to PyBaMM's documentation! — PyBaMM 22.11.1 ...
PyBaMM is available as a conda package through the conda-forge channel. conda install -c conda-forge pybamm. Optional solvers¶. Following GNU/Linux and macOS ...
Read more >
pybamm · PyPI
For instructions on how to create a virtual environment for PyBaMM, ... Using conda. PyBaMM is available as a conda package through the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found