khoj
khoj copied to clipboard
Conflicting dependencies when installing
How to fix this problem?
ERROR: Cannot install khoj-assistant==0.1.0, khoj-assistant==0.1.2, khoj-assistant==0.1.3 and khoj-assistant==0.1.4 because these package versions have conflicting dependencies.
The conflict is caused by:
khoj-assistant 0.1.4 depends on numpy==1.22.4
khoj-assistant 0.1.3 depends on numpy==1.22.4
khoj-assistant 0.1.2 depends on numpy==1.22.4
khoj-assistant 0.1.0 depends on numpy==1.22.4
What command are you running to install khoj and which OS are you on? A bit strange that there are multiple, older versions of khoj
that it's attempting to install. The recommended way to install khoj is by running pip install --upgrade khoj-assistant
. The most recent version of khoj released is 0.1.9
Thanks for the fast response. I am using the following:
pip install khoj-assistant
Could you run pip uninstall khoj-assistant && pip install --no-cache-dir --upgrade khoj-assistant
?
Just to ensure there's no pip related caching issues we're seeing on your
side
On Tue, Sep 13, 2022, 15:15 Name of Mine @.***> wrote:
Thanks for the fast response. I am using the following:
pip install khoj-assistant
— Reply to this email directly, view it on GitHub https://github.com/debanjum/khoj/issues/97#issuecomment-1245328659, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ5ZJJNPRUMS2NCXPU37ILV6BV7LANCNFSM6AAAAAAQLIVR2U . You are receiving this because you commented.Message ID: @.***>
Thanks.
I get this:
§ pip uninstall khoj-assistant && pip install --no-cache-dir --upgrade khoj-assistant 127 ✘
WARNING: Skipping khoj-assistant as it is not installed.
Collecting khoj-assistant
Downloading khoj_assistant-0.1.4-py3-none-any.whl (142 kB)
|████████████████████████████████| 142 kB 216 kB/s
Requirement already satisfied: pillow>=9.0.1 in ./opt/anaconda3/lib/python3.7/site-packages (from khoj-assistant) (9.0.1)
Downloading khoj_assistant-0.1.3-py3-none-any.whl (142 kB)
|████████████████████████████████| 142 kB 393 kB/s
Downloading khoj_assistant-0.1.2-py3-none-any.whl (142 kB)
|████████████████████████████████| 142 kB 594 kB/s
Downloading khoj_assistant-0.1.0-py3-none-any.whl (51 kB)
|████████████████████████████████| 51 kB 307 kB/s
ERROR: Cannot install khoj-assistant==0.1.0, khoj-assistant==0.1.2, khoj-assistant==0.1.3 and khoj-assistant==0.1.4 because these package versions have conflicting dependencies.
The conflict is caused by:
khoj-assistant 0.1.4 depends on numpy==1.22.4
khoj-assistant 0.1.3 depends on numpy==1.22.4
khoj-assistant 0.1.2 depends on numpy==1.22.4
khoj-assistant 0.1.0 depends on numpy==1.22.4
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
Ah, based on those logs
- You're on an older python version (3.7). The newer versions of Khoj need python >= 3.8
- You're running an anaconda python. Are you running the pip install command from within a conda environment?
Suggested fixes:
- You can fix
1.
by upgrading the installed version of python on your system/anaconda environment - A different version of numpy is already installed than the one required by Khoj. Some ways to solve this are:
- Installing Khoj in a separate virtualenv or conda environment.
- Checking if it's safe to upgrade/downgrade numpy to
1.22.4
and manually doing that before trying to reinstall Khoj
Thanks! I did:
git clone https://github.com/debanjum/khoj && cd khoj
conda env create -f config/environment.yml
conda activate khoj
Then I tried to run khoj by typing its name... but nothing happened.
I tried to install khoj like this with khoj env active, and got this error:
§ pip install khoj-assistant
Traceback (most recent call last):
File "/Users/User/opt/anaconda3/envs/khoj/bin/pip", line 6, in <module>
from pip._internal.cli.main import main
File "/Users/User/opt/anaconda3/envs/khoj/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/Users/User/opt/anaconda3/envs/khoj/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/Users/User/opt/anaconda3/envs/khoj/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "/Users/User/opt/anaconda3/envs/khoj/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 13, in <module>
import importlib.util
File "/Users/User/opt/anaconda3/lib/python3.7/importlib/__init__.py", line 51, in <module>
_w_long = _bootstrap_external._w_long
AttributeError: module 'importlib._bootstrap_external' has no attribute '_w_long'
File "/Users/User/opt/anaconda3/envs/khoj/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 13, in <module>
import importlib.util
File "/Users/User/opt/anaconda3/lib/python3.7/importlib/__init__.py", line 51, in <module>
From the above error logs there seems to be an issue with your anaconda environment as both python3.7 and python3.8 libraries are being used in it.
Then I tried to run khoj by typing its name... but nothing happened.
The instructions to setup Khoj using (ana-)conda are here. According to that if you can start khoj
by running python3 -m src.main -vv
after you've setup the khoj conda environment. You shouldn't need to pip install khoj-assistant
in the khoj conda environment.
- The khoj setup with conda instructions maybe stale as I haven't tested this flow for a while. So let me try the conda environment setup flow on my end to see if I can reproduce your issue. I'll get back about this by the end of this week