Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行main.py时遇到报错cannot import name 'ddg' from 'duckduckgo_search' #53

Open
wusongbai139 opened this issue Jan 18, 2024 · 3 comments

Comments

@wusongbai139
Copy link

报错内容:
(env) PS H:\agent\Chinese-LangChain> python main.py
2024-01-18 13:39:27,323 [INFO] [client.py:1027] HTTP Request: GET https://api.gradio.app/gradio-messaging/en "HTTP/1.1 200 OK"
Traceback (most recent call last):
File "H:\agent\Chinese-LangChain\main.py", line 6, in
from clc.langchain_application import LangChainApplication
File "H:\agent\Chinese-LangChain\clc\langchain_application.py", line 17, in
from clc.source_service import SourceService
File "H:\agent\Chinese-LangChain\clc\source_service.py", line 15, in
from duckduckgo_search import ddg
ImportError: cannot import name 'ddg' from 'duckduckgo_search' (H:\agent\Chinese-LangChain\env\lib\site-packages\duckduckgo_search_init
.py)

我有“duckduckgo_search”,但是其文件下没有ddg文件,我想知道如何解决,或者duckduckgo在整个项目中有没有别的替代方案

@wusongbai139
Copy link
Author

已经解决,安装duckduckgo_search的2023年的4月份的版本就行

@dingzt97
Copy link

您好,方便告知一下duckduckgo_search的版本号吗

@Qlalq
Copy link

Qlalq commented Feb 21, 2024

pip install duckduckgo-search==2.9.0

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

No branches or pull requests

3 participants