-
Getting following error when running $ pyinstaller --clean -y --log-level WARN server.spec
...
File ".../IceWhale-GPT-Test/venv/lib/python3.11/site-packages/PyInstaller/depend/imphook.py", line 386, in _load_hook_module
raise ImportErrorWhenRunningHook(self.hook_module_name, self.hook_filename)
PyInstaller.exceptions.ImportErrorWhenRunningHook: Failed to import module __PyInstaller_hooks_0_google_api required by hook for module /home/tiger/dev/IceWhaleTech/IceWhale-GPT-Test/venv/lib/python3.11/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-google.api.py. Please check whether module __PyInstaller_hooks_0_google_api actually exists and whether the hook is compatible with your version of /home/tiger/dev/IceWhaleTech/IceWhale-GPT-Test/venv/lib/python3.11/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-google.api.py: You might want to read more about hooks in the manual and provide a pull-request to improve PyInstaller. What can I do about it? Thanks! For full log, see https://pastebin.com/Rz3RUikZ The # -*- mode: python ; coding: utf-8 -*-
"""
NOTE: Keep this file version controlled.
"""
from PyInstaller.utils.hooks import collect_all
from PyInstaller.utils.hooks import collect_dynamic_libs
from PyInstaller.utils.hooks import copy_metadata
datas = []
binaries = []
hiddenimports = [
"chromadb.api.segment",
"chromadb.db.impl.sqlite",
"chromadb.db.impl",
"chromadb.migrations.embeddings_queue",
"chromadb.migrations",
"chromadb.segment.impl.manager.local",
"chromadb.segment.impl.manager",
"chromadb.segment.impl.metadata.sqlite",
"chromadb.segment.impl.metadata",
"chromadb.segment.impl.vector.batch",
"chromadb.segment.impl.vector.brute_force_index",
"chromadb.segment.impl.vector.hnsw_params",
"chromadb.segment.impl.vector.local_hnsw",
"chromadb.segment.impl.vector.local_persistent_hnsw",
"chromadb.segment.impl.vector",
"chromadb.telemetry.product.posthog",
]
datas += copy_metadata("auto-gptq", recursive=True)
datas += copy_metadata("chromadb", recursive=True)
datas += copy_metadata("optimum", recursive=True)
datas += copy_metadata("transformers", recursive=True)
tmp_ret = collect_all("chromadb")
datas += tmp_ret[0]
binaries += tmp_ret[1]
hiddenimports += tmp_ret[2]
tmp_ret = collect_all("langchain")
datas += tmp_ret[0]
binaries += tmp_ret[1]
hiddenimports += tmp_ret[2]
binaries += collect_dynamic_libs("nvidia.cuda_nvrtc", search_patterns=["lib*.so.*"])
a = Analysis( # pylint: disable = undefined-variable
["server.py"],
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
module_collection_mode={
"chromadb": "pyz+py",
"datasets": "pyz+py",
"optimum": "pyz+py",
},
)
pyz = PYZ(a.pure) # pylint: disable = undefined-variable
exe = EXE( # pylint: disable = undefined-variable
pyz,
a.scripts,
[],
exclude_binaries=True,
name="server",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT( # pylint: disable = undefined-variable
exe,
a.binaries,
a.datas,
strip=False,
upx=False,
upx_exclude=[],
name="server",
) |
Beta Was this translation helpful? Give feedback.
Answered by
rokm
Jan 3, 2024
Replies: 1 comment 5 replies
-
Either remove the offending hook ( or do a That hook is bogus, as it assumes that |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Aha, so it is availability of
googleapis-common-protos
withoutgoogle-api-core
being installed that is causing the issue. I've reproduced the error with a similar setup, and will remove the offending hook in pyinstaller/pyinstaller-hooks-contrib#682.