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

No module named skops.sklearn #441

Open
sayedmasihemami opened this issue Oct 1, 2024 · 3 comments
Open

No module named skops.sklearn #441

sayedmasihemami opened this issue Oct 1, 2024 · 3 comments

Comments

@sayedmasihemami
Copy link

python 3.12 on windows 10 (pyinstaller 6.10.0):

File "skops\io_init_.py", line 1, in
File "PyInstaller\loader\pyimod02_importers.py", line 378, in exec_module
File "skops\io_persist.py", line 22, in
File "importlib_init_.py", line 90, in import_module
ModuleNotFoundError: No module named 'skops.io._sklearn'

@adrinjalali
Copy link
Member

I cannot reproduce. Which version of skops are you downloading/installing?

@sayedmasihemami
Copy link
Author

I'm using version 0.10.0, the fix for now on my side was to add the following sets of hidden imports so that pyinstaller can collect/include the right files for skops in the distribution:

from PyInstaller.utils.hooks import collect_submodules
hidden_imports = collect_submodules("skops")
hidden_imports.extend(collect_submodules("skops.io.old"))
# give hidden_imports to pyinstaller

@adrinjalali
Copy link
Member

It's the first time I hear of pyinstaller. I'd welcome a fix here. It'd take me a while for me to get to this since I'd need to setup a windows machine and figure out how pyinstaller works to find a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants