Which library is the hook for?
rasterio
Have you gotten the library to work with pyinstaller?
Yes, but it needs several hidden imports.
Additional context
If I do this code, it works :
from PyInstaller.utils.hooks import collect_submodules
hiddenimports = collect_submodules('rasterio')