Create PyBaMM conda package
See original GitHub issueSummary 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:
- Created 4 years ago
- Comments:9
I installed
sundails
and now everything works fine, thank you. Sorry for the slow response!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?