spedas / pyspedas

Python-based Space Physics Environment Data Analysis Software
https://pyspedas.readthedocs.io/
MIT License
154 stars 60 forks source link

conda install pyspedas [enhancement] #275

Open johncoxon opened 1 year ago

johncoxon commented 1 year ago

It would be very useful to be able to install pyspedas using conda, since it would make using this framework much more convenient in conda environments.

ericthewizard commented 1 year ago

Thanks for the suggestion!

We've tried distributing through both PyPI and conda, but the support overhead with conda was too much.

Can you clarify how it would be more convenient? Is there a situation where you can't install PySPEDAS in your conda environment using PyPI?

johncoxon commented 1 year ago

It means that if I want to add packages to an environment that I've installed PySPEDAS in, I have to create an entirely new environment because pip makes changes to the environment that conda is unaware of.

It also means, for instance, that I can't give students a one-line method of creating a conda environment that includes PySPEDAS, which means I'm less likely to use it when supervising summer projects or master's projects, reducing its utility to me and presumably others in the community.

JeffreyBroll commented 1 year ago

Would it help to give them a conda environment.yaml? That's how I've been installing it - everything conda has gets managed by conda, everything it doesn't have gets put in the pip section. I can upload it as soon as I've run it from scratch and made sure it isn't stoopid.

JeffreyBroll commented 1 year ago

This .yml has conda install everything that can be conda installed - including dependencies of the things that can't be conda installed, like bokeh (which is no longer listed as a pyspedas requirement), matplotlib, and scipy - and the only things left to be grabbed from PyPI are

Since all of the dependencies of (dependencies of (...)) things that can be found in base or conda-forge are kept in conda's box, I've been able to install other things to such an environment without problems - or, maybe stated better, nothing else I've installed into this environment has needed these dependencies and none of their dependencies have been borked by pyspedas.

Rename me to pyspedas.yml, install with conda env create -f pyspedas.yml

johncoxon commented 1 year ago

Thank you, this is fabulous in the interim!