Skip to content
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

Deprecation of Python imp module #2995

Closed
vinferrer opened this issue Sep 13, 2024 · 1 comment
Closed

Deprecation of Python imp module #2995

vinferrer opened this issue Sep 13, 2024 · 1 comment

Comments

@vinferrer
Copy link

Describe the bug

When using dwicat, there is an import error for the module imp, I believe this is due to the fact that imp is deprecated and you should change it for the importlib: https://docs.python.org/3.11/library/imp.html

To Reproduce

conda create -n mrtrix-3.0.4 -c mrtrix3 mrtrix3=3.0.4
 conda activate mrtrix-3.0.4
dwicat 
Traceback (most recent call last):
  File "/home/vicente/miniconda3/envs/mrtrix-3.0.4/bin/dwicat", line 161, in <module>
    import mrtrix3
  File "/home/vicente/miniconda3/envs/mrtrix-3.0.4/bin/mrtrix3.py", line 17, in <module>
    import imp, os, sys
ModuleNotFoundError: No module named 'imp'

If the issue is data-dependent, please consider providing a link to
(anonymised) data to assist developers in reproducing the bug.

Platform/Environment/Version

Please provide the following information:

  • OS: ubuntu: 24.02

  • MRtrix3 version MRtrix 3.0.4 Dec 14 2022

@Lestropie
Copy link
Member

Thanks for the bump. This is already rectified on master (#2731, #2735), but is not yet part of a tagged release. If you configure your environment to use Python 3.11 rather than 3.12 you should be able to get by until we do an update.

@MRtrix3/mrtrix3-devs: We should prioritise generating 3.0.5, as otherwise this will keep coming up. I have created a milestone for this patch update. Many PRs to master require independent review; please pick some to look at and approve.

@Lestropie Lestropie changed the title [command]: [bug report title] Deprecation of Python imp module Sep 16, 2024
@Lestropie Lestropie added this to the 3.0.5 updates milestone Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants