threeML / threeML

The Multi-Mission Maximum Likelihood framework (3ML)
BSD 3-Clause "New" or "Revised" License
73 stars 59 forks source link

install with xspec-models via conda: reordered install commands #553

Open JohannesBuchner opened 2 years ago

JohannesBuchner commented 2 years ago

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:

Expected behavior Installation successful

Desktop (please complete the following information):

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
grburgess commented 2 years ago

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.

JohannesBuchner commented 2 years ago

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.

grburgess commented 2 years ago

Yes. I am currently having the same issues.

omodei commented 2 years ago

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 commented 2 years ago

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.