-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3.12 import AttributeError: 'FileFinder' object has no attribute 'find_module' #7458
Labels
Comments
KumoLiu
added
bug
Something isn't working
dependencies
Pull requests that update a dependency file
labels
Feb 14, 2024
I am facing the same issue. Have you resolved it? Do I need to depreciate the python library to lower version? |
I just downgraded Python to 11* version and installed monai, and it worked! |
KumoLiu
added a commit
to KumoLiu/MONAI
that referenced
this issue
Feb 21, 2024
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
7 tasks
KumoLiu
added a commit
that referenced
this issue
Feb 21, 2024
Fixes #7458 ### Description https://github.com/python/cpython/blob/a21c0c7def9a8495f1166d9b434dfc301cb92bff/Lib/importlib/abc.py#L68 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
juampatronics
pushed a commit
to juampatronics/MONAI
that referenced
this issue
Mar 25, 2024
Fixes Project-MONAI#7458 ### Description https://github.com/python/cpython/blob/a21c0c7def9a8495f1166d9b434dfc301cb92bff/Lib/importlib/abc.py#L68 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> Signed-off-by: Juan Pablo de la Cruz Gutiérrez <juampatronics@gmail.com>
Yu0610
pushed a commit
to Yu0610/MONAI
that referenced
this issue
Apr 11, 2024
Fixes Project-MONAI#7458 ### Description https://github.com/python/cpython/blob/a21c0c7def9a8495f1166d9b434dfc301cb92bff/Lib/importlib/abc.py#L68 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> Signed-off-by: Yu0610 <612410030@alum.ccu.edu.tw>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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:
-> 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:
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.
The text was updated successfully, but these errors were encountered: