We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fffc1c2 + 52a6bf2 commit 7139c7fCopy full SHA for 7139c7f
nipype/interfaces/base/core.py
@@ -1045,12 +1045,12 @@ class LibraryBaseInterface(BaseInterface):
1045
def __init__(self, check_import=True, *args, **kwargs):
1046
super().__init__(*args, **kwargs)
1047
if check_import:
1048
- import pkgutil
+ import importlib.util
1049
1050
failed_imports = [
1051
pkg
1052
for pkg in (self._pkg,) + tuple(self.imports)
1053
- if pkgutil.find_loader(pkg) is None
+ if importlib.util.find_spec(pkg) is None
1054
]
1055
if failed_imports:
1056
iflogger.warning(
0 commit comments