Giter Club home page Giter Club logo

Comments (9)

debanjum avatar debanjum commented on May 16, 2024

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

from khoj.

AtomicNess123 avatar AtomicNess123 commented on May 16, 2024

Thanks for the fast response. I am using the following:

pip install khoj-assistant

from khoj.

debanjum avatar debanjum commented on May 16, 2024

from khoj.

AtomicNess123 avatar AtomicNess123 commented on May 16, 2024

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

from khoj.

debanjum avatar debanjum commented on May 16, 2024

Ah, based on those logs

  1. You're on an older python version (3.7). The newer versions of Khoj need python >= 3.8
  2. 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:
    1. Installing Khoj in a separate virtualenv or conda environment.
    2. Checking if it's safe to upgrade/downgrade numpy to 1.22.4 and manually doing that before trying to reinstall Khoj

from khoj.

AtomicNess123 avatar AtomicNess123 commented on May 16, 2024

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.

from khoj.

AtomicNess123 avatar AtomicNess123 commented on May 16, 2024

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'

from khoj.

debanjum avatar debanjum commented on May 16, 2024
   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.

  1. 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

from khoj.

debanjum avatar debanjum commented on May 16, 2024

Updated instructions to setup Khoj with Conda in 676de23. Verified setup with Conda works on an Ubuntu 22.04 machine. Closing issue as no updates provided in a while. Feel free to re-open if required

from khoj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.