Skip to content

fix the missing version for duckduckgo-search#3

Open
shawnsang wants to merge 2 commits intowade1010:mainfrom
shawnsang:fix-missing-duckduckgo-search-version
Open

fix the missing version for duckduckgo-search#3
shawnsang wants to merge 2 commits intowade1010:mainfrom
shawnsang:fix-missing-duckduckgo-search-version

Conversation

@shawnsang
Copy link

#1

Other python version may not work well.
@InTheFuture7
Copy link

InTheFuture7 commented Jan 7, 2025

@shawnsang I also encountered the issue with the duckduckgo-search version. I tried some workarounds, which seemed to resolve that problem, but I ran into another issue afterward. Could you provide some suggestions before the maintainer fixes the bug?

I tried to install graphrag-ui via:

pip install graphrag-ui  

But it failed due to a dependency conflict (duckduckgo-search==6.2.11 not available on PyPI).
As an alternative, I cloned the GitHub repository, updated the requirements.txt to use a compatible version(6.2.12) of duckduckgo-search, and installed dependencies using:

pip install -r requirements.txt  

The installation succeeded, but when I tried to run:

graphrag-ui-server  

I got the error:

graphrag-ui-server: command not found  

Questions

  1. Is it correct to install graphrag-ui directly from requirements.txt?
  2. How can I resolve the graphrag-ui-server: command not found issue after manual installation?

Looking forward to your suggestions. Thank you!

@shawnsang
Copy link
Author

@InTheFuture7 , based on the Readme, there no command like 'graphrag-ui-server' , you should launch it like :

Clean version

This version only supports indexing, Prompt Tuning, and file management, without query functionality.

gradio index_app.py
or
python index_app.py

Comprehensive version

This version adds visualizations, configuration management, and GraphRAG chat functionality on top of the clean version.

python app.py

@InTheFuture7
Copy link

@shawnsang Thank you, the issue regarding the incorrect version of duckduckgo has been resolved. Based on your response and the README file, I performed the following steps:

  1. Edited the requirements.txt file to set the duckduckgo-search version to 6.2.12.
  2. Ran the following commands:
cd graphrag-ui
pip install -r requirements.txt

After resolving the above issue, I encountered another problem.

In short, there are conflicts between some packages from graphrag and the packages listed in requirements.txt. Could you please share how you resolved this issue? Thank you again!

Below is a detailed description of the problem.

Problem description

When I run the command:

python api.py --host 0.0.0.0 --port 8012 --reload  

I encounter the following prompt:

The 'graphrag' package is not installed. Please install it using 'pip install graphrag'.Since the dependency package `aiofiles` of `graphrag` conflicts with the requirements of `gradio`, it is necessary to manually install `graphrag` separately.  

I proceeded to run:

pip install graphrag  

However, during the installation, there were several conflicts between graphrag dependencies (httpx, tenacity, aiofiles) and the ones required by the already-installed libraries (gradio, langchain, ollama, tiktoken).

Attempt

Attempt 1: Ignore conflicts and run anyway

When I ignored the warnings and tried to run the script again, I received the following error:

Traceback (most recent call last):  
  File "/Data/username/qw/graphragui/graphrag-ui-main/api.py", line 45, in <module>  
    from graphrag.query.input.loaders.dfs import store_entity_semantic_embeddings  
ImportError: cannot import name 'store_entity_semantic_embeddings' from 'graphrag.query.input.loaders.dfs' (/Data/username/qw/graphragui/graphrag/graphrag/query/input/loaders/dfs.py)  
This indicates that the module or function store_entity_semantic_embeddings is not available or improperly installed, possibly due to version or dependency mismatches.

Attempt 2: Manual adjustment using Poetry

Based on the output message, I manually updated graphrag dependencies to resolve conflicts. Specifically, I modified the pyproject.toml file in graphrag to remove the conflicting dependencies (httpx, tenacity, aiofiles). Then, I updated the lock file and reinstalled the dependencies:

poetry lock  
poetry install  

Despite this, the earlier ImportError persisted:

ImportError: cannot import name 'store_entity_semantic_embeddings' from 'graphrag.query.input.loaders.dfs'  

@shawnsang
Copy link
Author

graphrag-ui_package_list.txt

@InTheFuture7 , sorry late to reply to you. I do not have more time to check it, so attach my environment package list for your reference.

So, I think you can use poetry add all package one by one in an new conda environment. That may fix these issues.

@InTheFuture7
Copy link

@shawnsang Thank you so much for taking the time to share this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants