threeML icon indicating copy to clipboard operation
threeML copied to clipboard

install with xspec-models via conda: reordered install commands

Open JohannesBuchner opened this issue 1 year ago • 5 comments

Describe the bug Installing from a fresh conda installation failed

To Reproduce Steps to reproduce the behavior:

  1. install miniconda and mamba
  2. mamba create --name threeML -c conda-forge python=3.7 numpy scipy matplotlib
  3. conda activate threeML
  4. mamba install -c conda-forge -c threeml astromodels threeml
  5. mamba install -c xspecmodels xspec-modelsonly

Errors:

  • - nothing provides ccfits 2.5 needed by xspec-modelsonly-6.22.1-h1c2f66e_1
  • solved by installing ccfits from conda-forge
  • however, this pulls 2.6 by default, but 2.5 is needed --> ccfits==2.5 works
  • - nothing provides libgfortran needed by xspec-modelsonly-6.22.1-h1c2f66e_1
  • solved by installing libgfortran5 from conda-forge
  • - nothing provides cfitsio 3.410 needed by xspec-modelsonly-6.22.1-h1c2f66e_1
  • solved by installing cfitsio==3.470 from conda-forge but then the subsequent installation failed again due to conflicts.

Expected behavior Installation successful

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version: 20.04 mamba 0.15.3

Solution

Adding conda-forge as a channel in the last install command, so it can pull the necessary dependencies does not work, gives error - package cfitsio-3.470-h5893167_7 requires libgfortran5 >=11.2.0, but none of the providers can be installed.

This sequence of commands works:

conda create --name threeML -c conda-forge -c xspecmodels python=3.7 numpy scipy matplotlib xspec-modelsonly

conda activate threeML
conda install -c conda-forge -c threeml astromodels threeml

JohannesBuchner avatar Jul 31 '22 20:07 JohannesBuchner

Thanks @JohannesBuchner! Yes someone recently put another version of astromodels on conda-forge and because of the complicated issues linking to xspec, it has caused the install process to become fragile requiring the proper channel and install order. There are several ways to circumvent this, but I need to update the install instructions which I plan to do today. Sorry for the hassle.

grburgess avatar Aug 01 '22 05:08 grburgess

Correction: the commands I gave ran through with mamba, but when running it does not work: this h5py issue occurs https://github.com/h5py/h5py/issues/1880

Currently rerunning with conda, but it seems to be stuck at the "solving" step.

JohannesBuchner avatar Aug 01 '22 08:08 JohannesBuchner

Yes. I am currently having the same issues.

grburgess avatar Aug 01 '22 08:08 grburgess

The first set of commands installed an old version of xspec-modelsonly (6.22) instead of the most current one (6.25). The environment needs to be created with all the required packages installed together (threeml astromodels xspec-modelsonly). Or you should use the installer script as described in the documentation.

omodei avatar Aug 16 '22 22:08 omodei

Note: there was a version of ccfits in threeml channel (v2.5). I remove it and now conda gets the version of ccfits in conda-forge (2.6). I have tried the installer and everything works on MacOS.

omodei avatar Aug 16 '22 22:08 omodei