datacarpentry / astronomy-python

https://datacarpentry.org/astronomy-python/
Other
30 stars 32 forks source link

gala not installed when Conda-forge is not an available channel #220

Open abostroem opened 11 months ago

abostroem commented 11 months ago

What is the problem?

A number of learners are getting the error:

conda env create -f environment.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound: 
  - gala

I believe this is due to gala being on conda-forge and these learners not having Conda-forge as a channel. My solution is to have them remove this line from the environement.yml file and then activate the AstronomicalData environment after they created it and pip install. However, we could also consider adding the Conda-forge channel - I just don't know if this might mess with other installation

Location of problem (optional)

No response

rkotulla commented 11 months ago

Alternatively: The main reason for using gala at all is the GD1Koposov model and the reflex correction. GD1Koposov is now natively in astropy, and the reflex-correction is a simple function that only works on astropy SkyCoords and doesn't rely on anything else in gala. Therefore, we could copy this function into the lesson itself (or the catchup part learners can import) and remove the entire dependency on gala, thus getting rid of this installation head-ache.

abostroem commented 11 months ago

My concern with this is I think it is poor coding practice as we will not get any updates or bug fixes to the real code. I also encountered an issue with using the astropy GD1 - maybe you know how to fix it. See issue #193

abostroem commented 11 months ago

actually, Conda-forge is a listed channel in the environment file - I'm not sure why this isn't working