ImportError: cannot import name CDM from pyHalo.preset_models (dependency/API mismatch)
Hello maintainers,
While testing this repository on a clean Windows setup, I encountered a dependency/API mismatch that prevents running the Model_I simulation scripts.
Description
Running Model_I/sim_axion.py fails during import with:
ImportError: cannot import name 'CDM' from 'pyHalo.preset_models'
This happens before the script reaches execution, so it blocks cross-platform testing and reproducibility for new contributors.
Steps to Reproduce
- Clone the repository
- Create and activate a virtual environment (Windows) and install dependencies:
py -3.11 -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
pip install -e .
- Run:
python Model_I/sim_axion.py
Observed Behavior
The script fails with:
ImportError: cannot import name 'CDM' from 'pyHalo.preset_models'
Environment:
Installed pyHalo version:
python -c "import pyHalo; print(pyHalo.__version__)"
Output:
Additional check:
python -c "import pyHalo.preset_models as pm; print([x for x in dir(pm) if 'CDM' in x])"
Output:
Expected Behavior
The simulation scripts should run successfully after installation.
Alternatively, the repository should pin a compatible pyHalo version and/or update the import statement according to the correct pyHalo API.
Thank you!
ImportError: cannot import name
CDMfrompyHalo.preset_models(dependency/API mismatch)Hello maintainers,
While testing this repository on a clean Windows setup, I encountered a dependency/API mismatch that prevents running the Model_I simulation scripts.
Description
Running
Model_I/sim_axion.pyfails during import with:This happens before the script reaches execution, so it blocks cross-platform testing and reproducibility for new contributors.
Steps to Reproduce
Observed Behavior
The script fails with:
Environment:
Installed
pyHaloversion:python -c "import pyHalo; print(pyHalo.__version__)"Output:
Additional check:
python -c "import pyHalo.preset_models as pm; print([x for x in dir(pm) if 'CDM' in x])"Output:
Expected Behavior
The simulation scripts should run successfully after installation.
Alternatively, the repository should pin a compatible
pyHaloversion and/or update the import statement according to the correctpyHaloAPI.Thank you!