Description
Describe the bug
When installing monai (via pip) into a conda environment of python 3.12.1, I get a
"
AttributeError: 'FileFinder' object has no attribute 'find_module'
"
as soon as i call "import monai"
To Reproduce
Steps to reproduce the behavior:
- conda create --name test python=3.12
- conda activate test
- pip install monai
- python
- import monai
-> see screenshot below
Expected behavior
I should be able to import monai
Screenshots
installing monai triggered a lot of other package installations:
Environment
Ensuring you use the relevant python executable, please paste the output of:
python -c "import monai; monai.config.print_debug_info()"
Well, the import statement crashes, so this info cannot be given.
Additional context
I am pretty sure it has to do with "find_module" being deprecated in python 3.12, as well as the "load_module" function in monai.utils.module.py (line 210 and following). Probably needs to be replaced with the 3.12 version of those function calls.