Closed fkgruber closed 10 months ago
Hey @fkgruber , were you able to install the package despite the above errors? I wonder how it let you proceed if there was an issue installing the dependencies.
It looks like you're trying to run an older version of Khoj. I'm guessing this is because pip tried installing older versions until it found one that was compatible. Are you able to run khoj --version
, or see what version of Khoj ends up being installed in the logs?
From the logs, it looks like this could be an issue with pyside
and glibc
. Here's a relevant SO post.
Here's what we can try:
ldd --version
. You have to be on version 2.35 or greater.pip install --upgrade pip
and try re-installingversion didn't work
khoj --version /home/fred/.local/lib/python3.9/site-packages/huggingface_hub/snapshot_download.py:6: FutureWarning: snapshot_download.py has been made private and will no longer be available from version 0.11. Please use
from huggingface_hub import snapshot_download
to import the only public function in this module. Other members of the file may be changed without a deprecation notice. warnings.warn( usage: khoj [-h] [--config-file CONFIG_FILE] [--regenerate] [--verbose] [--host HOST] [--port PORT] [--socket SOCKET] khoj: error: unrecognized arguments: --version
I see my ldd is too old:
fred@raspberrypi3:~$ ldd --version ldd (Debian GLIBC 2.31-13+rpt2+rpi1+deb11u5) 2.31 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper.
I tried updating pip and reinstalling and got:
sudo pip install khoj-assistant
Requirement already satisfied: khoj-assistant in /usr/local/lib/python3.9/dist-packages (0.1.4)
so it does seems to have installed a really old one. I'm trying
sudo pip install --upgrade khoj-assistant
Hey @fkgruber , were you able to install the package despite the above errors? I wonder how it let you proceed if there was an issue installing the dependencies.
It looks like you're trying to run an older version of Khoj. I'm guessing this is because pip tried installing older versions until it found one that was compatible. Are you able to run
khoj --version
, or see what version of Khoj ends up being installed in the logs?From the logs, it looks like this could be an issue with
pyside
andglibc
. Here's a relevant SO post.Here's what we can try:
- Run
ldd --version
. You have to be on version 2.35 or greater.- Run
pip install --upgrade pip
and try re-installing
well that did not work. Still ended up with the old version.
I tried
sudo pip install --upgrade khoj-assistant==0.10.1
and got
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting khoj-assistant==0.10.1 Using cached https://www.piwheels.org/simple/khoj-assistant/khoj_assistant-0.10.1-py3-none-any.whl (1.2 MB) Collecting defusedxml==0.7.1 Using cached https://www.piwheels.org/simple/defusedxml/defusedxml-0.7.1-py2.py3-none-any.whl (25 kB) Requirement already satisfied: dateparser==1.1.1 in /usr/local/lib/python3.9/dist-packages (from khoj-assistant==0.10.1) (1.1.1) Collecting aiohttp==3.8.4 Using cached aiohttp-3.8.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.0 MB) Collecting torch>=2.0.1 Using cached torch-2.0.1-cp39-cp39-manylinux2014_aarch64.whl (74.0 MB) Requirement already satisfied: uvicorn==0.17.6 in /usr/local/lib/python3.9/dist-packages (from khoj-assistant==0.10.1) (0.17.6) Requirement already satisfied: jinja2==3.1.2 in /usr/local/lib/python3.9/dist-packages (from khoj-assistant==0.10.1) (3.1.2) Collecting tenacity>=8.2.2 Using cached https://www.piwheels.org/simple/tenacity/tenacity-8.2.3-py3-none-any.whl (24 kB) ERROR: Could not find a version that satisfies the requirement gpt4all>=1.0.7 (from khoj-assistant) ERROR: No matching distribution found for gpt4all>=1.0.7 fred@raspberrypi3:~$
strange I only see old version of gpt4all pip index versions gpt4all WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning. gpt4all (0.1.7) Available versions: 0.1.7, 0.1.6, 0.1.5 INSTALLED: 0.1.7 LATEST: 0.1.7
THis is a well known issue: https://github.com/nomic-ai/gpt4all/issues/748
why do I even need gpt4all? Is there a way to install khoj without it? Is this only for the chat functionality?
I tried installing khoj using--no-dependencies but then when I run it I get:
OSError: /usr/local/lib/python3.9/dist-packages/gpt4all/llmodel_DO_NOT_MODIFY/build/libllama.so: cannot open shared object file: No such file or directory
why do I even need gpt4all? Is there a way to install khoj without it? Is this only for the chat functionality?
Yes, gpt4all is only used for the offline chat functionality. We don't currently provide different flavors of the khoj python package unfortunately.
The best you can do right now is to manually yank out gpt4all by cloning the khoj repo and building a modified version of it from scratch 😬
Hey @fkgruber , this shouldn't be an issue anymore. When installing Khoj in v0.13.0, it'll skip installing gpt4all if you're machine is Linux & arch is arm. See the relevant commit here: https://github.com/khoj-ai/khoj/commit/2dd15e9f632d045bd7715c25c8dbc8d9423c31e3. This does unfortunately mean you cannot use the offline model, but you should be able to configure your OpenAI key.
You can upgrade by running pip install --upgrade khoj-assistant
. Let me know if you experience other issues.
does offline work when using the official docker (pre) image? I'm seeing the following from the emacs client...
Contacting host: 127.0.0.1:42110 [2 times]
Chat processor not configured. Configure OpenAI API key and restart it. Exception: [(file-error http://127.0.0.1:42110/api/chat?q=Hello&n=5&client=emacs Internal server error)]
khoj--query-chat-api-and-render-messages: Wrong type argument: listp, "Chat processor not configured. Configure OpenAI API key and restart it. Exception: [(file-error http://127.0.0.1:42110/api/chat?q=Hello&n=5&client=emacs Internal server error)]"
I have a working OpenAI API set up and can chat from the WebUI, but can't do anything from emacs.
When I had khoj installed using pip (outside of docker) offline seem to work.
Hi I was able to install it but when I run it I get:
Also during installation I noticed the following error: