-
Notifications
You must be signed in to change notification settings - Fork 65
Open
mwt5345/DeepLenseSim
#1Description
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.pyObserved Behavior
The script fails with:
ImportError: cannot import name 'CDM' from 'pyHalo.preset_models'
Environment:
- OS: Windows
- Python: 3.11
Installed pyHalo version:
python -c "import pyHalo; print(pyHalo.__version__)"Output:
0.2.8
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!
Metadata
Metadata
Assignees
Labels
No labels