kotaemon icon indicating copy to clipboard operation
kotaemon copied to clipboard

[BUG] kotaemon 0.9.2 requires umap-learn==0.5.5, but you have umap-learn 0.5.7 which is incompatible.

Open dromeuf opened this issue 1 year ago • 5 comments

Description

Hi,

On conda python 3.11 env kotaemon install and run work well.

In second time, I would like to install nanoGraphRAG but dependency problem and starting crash.

Thanks for your work, Kind regards, David

  Attempting uninstall: umap-learn
    Found existing installation: umap-learn 0.5.5
    Uninstalling umap-learn-0.5.5:
      Successfully uninstalled umap-learn-0.5.5
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
kotaemon 0.9.2 requires umap-learn==0.5.5, but you have umap-learn 0.5.7 which is incompatible.
Successfully installed Mako-1.3.6 POT-0.9.5 alembic-1.14.0 anytree-2.12.1 asyncer-0.0.8 autograd-1.7.0 beartype-0.18.5 datasets-3.1.0 dill-0.3.8 dspy-2.5.41 dspy-ai-2.5.41 fsspec-2024.9.0 future-1.0.0 gensim-4.3.3 graspologic-3.4.1 graspologic-native-1.2.1 hnswlib-0.8.0 hyppo-0.4.0 json-repair-0.30.2 jsonschema-4.23.0 jsonschema-specifications-2024.10.1 litellm-1.51.0 magicattr-0.1.6 multiprocess-0.70.16 nano-graphrag-0.0.8.2 nano-vectordb-0.0.4.3 neo4j-5.27.0 optuna-4.1.0 patsy-1.0.1 referencing-0.35.1 rpds-py-0.21.0 scipy-1.12.0 seaborn-0.13.2 smart-open-7.0.5 statsmodels-0.14.4 umap-learn-0.5.7 xxhash-3.5.0

starting crash if I dont use your :: To quickly fix: pip uninstall hnswlib chroma-hnswlib && pip install chroma-hnswlib

(kotaemon) :~/kotaemon$ python app.py
[nltk_data] Downloading package punkt_tab to
[nltk_data]     /home/dromeuf/anaconda3/envs/kotaemon/lib/python3.11/s
[nltk_data]     ite-packages/llama_index/core/_static/nltk_cache...
[nltk_data]   Package punkt_tab is already up-to-date!
GraphRAG dependencies not installed. Try `pip install graphrag future` to install. GraphRAG retriever pipeline will not work properly.
LightRAG dependencies not installed. Try `pip install git+https://github.com/HKUDS/LightRAG.git` to install. LighthRAG retriever pipeline will not work properly.
INFO:chromadb.telemetry.product.posthog:Anonymized telemetry enabled. See                     https://docs.trychroma.com/telemetry for more information.
Traceback (most recent call last):
  File "/home/kot/kotaemon/app.py", line 15, in <module>
    app = App()
          ^^^^^
...       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kot/anaconda3/envs/kotaemon/lib/python3.11/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 527, in get_file_handle_count
    hnswlib_count = hnswlib.Index.file_handle_count
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'hnswlib.Index' has no attribute 'file_handle_count'
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kota/kotaemon/app.py", line 15, in <module>
    app = App()
          ^^^^^
  File "/home/kota/kotaemon/libs/ktem/ktem/app.py", line 73, in __init__
...  File "/home/kota/kotaemon/libs/ktem/ktem/index/manager.py", line 68, in build_index
    raise ValueError(f'Cannot create index "{name}": {e}')
ValueError: Cannot create index "NanoGraphRAG": type object 'hnswlib.Index' has no attribute 'file_handle_count'

If I quick fix with your :: To quickly fix: pip uninstall hnswlib chroma-hnswlib && pip install chroma-hnswlib

I can import PDF documents in NanoGraphRAG collection file. I see entitys in log console...

But when I request prompt in the CHAT with nanoGraphRAG file select, I see Thinking but it displays error surrounded by red in the middle of the chat screen and the information panel on the right.

log

searching in doc_ids []
INFO:ktem.index.file.pipelines:Skip retrieval because of no selected files: DocumentRetrievalPipeline(
  (vector_retrieval): <function Function._prepare_child.<locals>.exec at 0x7f2d9c31d9e0>
  (embedding): <function Function._prepare_child.<locals>.exec at 0x7f2d9c31d9e0>
)
INFO:httpx:HTTP Request: POST http://localhost:11434/v1/embeddings "HTTP/1.1 200 OK"
GraphRAG embedding dim 5120
INFO:nano-graphrag:Load KV full_docs with 28 data
INFO:nano-graphrag:Load KV text_chunks with 33 data
INFO:nano-graphrag:Load KV llm_response_cache with 90 data
INFO:nano-graphrag:Load KV community_reports with 0 data
INFO:nano-graphrag:Loaded graph from /home/dromeuf/kotaemon/ktem_app_data/user_data/files/nano_graphrag/3266e868-e745-4b76-8d8b-4280c6eb6185/input/graph_chunk_entity_relation.graphml with 56 nodes, 28 edges
INFO:nano-vectordb:Load (52, 5120) data
INFO:nano-vectordb:Init {'embedding_dim': 5120, 'metric': 'cosine', 'storage_file': '/home/kota/kotaemon/ktem_app_data/user_data/files/nano_graphrag/3266e868-e745-4b76-8d8b-4280c6eb6185/input/vdb_entities.json'} 52 data
INFO:httpx:HTTP Request: POST http://localhost:11434/v1/embeddings "HTTP/1.1 200 OK"
Traceback (most recent call last):
  File "/home/kota/anaconda3/envs/kotaemon/lib/python3.11/site-packages/gradio/queueing.py", line 575, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ...  File "/home/kota/anaconda3/envs/kotaemon/lib/python3.11/site-packages/nano_graphrag/_op.py", line 702, in <lambda>
    related_community_datas[k]["report_json"].get("rating", -1),
    ~~~~~~~~~~~~~~~~~~~~~~~^^^
KeyError: '1'
INFO:httpx:HTTP Request: POST http://localhost:11434/v1/chat/completions "HTTP/1.1 200 OK"
User-id: 1, can see public conversations: True

Idem for LightRAG with error dependency.

When I install MS GraphRAG this error dependency. But document integration using embedding qwen2.5:14b seems to work well (but obviously takes a long time) as do chat queries (LLM qwen2.5:14b too) with mindmap and entity graph display.

  Attempting uninstall: lancedb
    Found existing installation: lancedb 0.16.0
    Uninstalling lancedb-0.16.0:
      Successfully uninstalled lancedb-0.16.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
lightrag-hku 1.0.2 requires hnswlib, which is not installed.
nano-graphrag 0.0.8.2 requires hnswlib, which is not installed.
langchain-community 0.2.11 requires tenacity!=8.4.0,<9.0.0,>=8.1.0, but you have tenacity 9.0.0 which is incompatible.
gradio 4.39.0 requires aiofiles<24.0,>=22.0, but you have aiofiles 24.1.0 which is incompatible.
langchain-core 0.2.43 requires tenacity!=8.4.0,<9.0.0,>=8.1.0, but you have tenacity 9.0.0 which is incompatible.
langchain 0.2.15 requires tenacity!=8.4.0,<9.0.0,>=8.1.0, but you have tenacity 9.0.0 which is incompatible.
llama-index-core 0.10.68.post1 requires tenacity!=8.4.0,<9.0.0,>=8.2.0, but you have tenacity 9.0.0 which is incompatible.
kotaemon 0.9.2 requires tenacity<8.3,>=8.2.3, but you have tenacity 9.0.0 which is incompatible.
kotaemon 0.9.2 requires umap-learn==0.5.5, but you have umap-learn 0.5.7 which is incompatible.
llama-index-legacy 0.9.48.post4 requires tenacity<9.0.0,>=8.2.0, but you have tenacity 9.0.0 which is incompatible.
Successfully installed PyJWT-2.10.1 aiofiles-24.1.0 aiolimiter-1.1.1 azure-common-1.1.28 azure-identity-1.19.0 azure-search-documents-11.5.2 azure-storage-blob-12.24.0 datashaper-0.0.49 devtools-0.12.2 environs-11.2.1 graphrag-0.3.6 json-repair-0.28.4 lancedb-0.13.0 msal-1.31.1 msal-extensions-1.2.0 py-1.11.0 pyaml-env-1.2.1 pyarrow-15.0.2 pylance-0.17.0 retry-0.9.2 tenacity-9.0.0 tiktoken-0.7.0

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

Browsers

Firefox

OS

Linux

Additional information

No response

dromeuf avatar Nov 30 '24 21:11 dromeuf

我也遇到了这个错误

imxiaoqiao avatar Dec 01 '24 06:12 imxiaoqiao

And Docling error dependencys :

Installing collected packages: python-bidi, pyclipper, XlsxWriter, tifffile, Shapely, rtree, pypdfium2, opencv-python-headless, ninja, marko, lazy-loader, jsonref, jsonlines, imageio, docling-parse, scikit-image, python-pptx, typer, pydantic-settings, torchvision, docling-core, easyocr, docling-ibm-models, deepsearch-glm, docling
  Attempting uninstall: typer
    Found existing installation: typer 0.14.0
    Uninstalling typer-0.14.0:
      Successfully uninstalled typer-0.14.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
gradio 4.39.0 requires aiofiles<24.0,>=22.0, but you have aiofiles 24.1.0 which is incompatible.
kotaemon 0.9.2 requires tenacity<8.3,>=8.2.3, but you have tenacity 9.0.0 which is incompatible.
kotaemon 0.9.2 requires umap-learn==0.5.5, but you have umap-learn 0.5.7 which is incompatible.
Successfully installed Shapely-2.0.6 XlsxWriter-3.2.0 deepsearch-glm-0.26.1 docling-2.8.1 docling-core-2.6.1 docling-ibm-models-2.0.7 docling-parse-2.1.2 easyocr-1.7.2 imageio-2.36.1 jsonlines-3.1.0 jsonref-1.1.0 lazy-loader-0.4 marko-2.1.2 ninja-1.11.1.2 opencv-python-headless-4.10.0.84 pyclipper-1.3.0.post6 pydantic-settings-2.6.1 pypdfium2-4.30.0 python-bidi-0.6.3 python-pptx-1.0.2 rtree-1.3.0 scikit-image-0.24.0 tifffile-2024.9.20 torchvision-0.20.1 typer-0.12.5

dromeuf avatar Dec 02 '24 17:12 dromeuf

Same problem here.

ArneJanning avatar Dec 05 '24 21:12 ArneJanning

Similar problem... after running: pip install git+https://github.com/HKUDS/LightRAG.git Before that thewre was no problem after clean install only of: Installed conda, python 3.10. pip install -e "libs/kotaemon[all]" and pip install -e "libs/ktem"

It was running, but no ollama... so I wanted to install the needed LightRag... So end up having problem with hnswlib

pip show hnswlib Name: hnswlib Version: 0.8.0 Summary: hnswlib Home-page: https://github.com/yurymalkov/hnsw Location: /home/dragon/miniconda3/envs/kotaemon/lib/python3.10/site-packages Requires: numpy Required-by: lightrag-hku, nano-graphrag

HyperUpscale avatar Dec 09 '24 11:12 HyperUpscale

Similar problem... after running: pip install git+https://github.com/HKUDS/LightRAG.git Before that thewre was no problem after clean install only of: Installed conda, python 3.10. pip install -e "libs/kotaemon[all]" and pip install -e "libs/ktem"

It was running, but no ollama... so I wanted to install the needed LightRag... So end up having problem with hnswlib

pip show hnswlib Name: hnswlib Version: 0.8.0 Summary: hnswlib Home-page: https://github.com/yurymalkov/hnsw Location: /home/dragon/miniconda3/envs/kotaemon/lib/python3.10/site-packages Requires: numpy Required-by: lightrag-hku, nano-graphrag

I tried again ... delete the environment and recreate again. But this time I installed LightRag first: so, I tried in reverse order : ... pip install git+https://github.com/HKUDS/LightRAG.git ... pip install -e "libs/kotaemon[all]" pip install -e "libs/ktem"

That worked (workaround) :) :)

HyperUpscale avatar Dec 09 '24 12:12 HyperUpscale