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

ImportError: cannot import name 'ddg' from 'duckduckgo_search' #151

Open
henrry007 opened this issue Feb 21, 2024 · 3 comments
Open

ImportError: cannot import name 'ddg' from 'duckduckgo_search' #151

henrry007 opened this issue Feb 21, 2024 · 3 comments

Comments

@henrry007
Copy link

E:\python\LangChain-ChatGLM-Webui> python app.py
Traceback (most recent call last):
File "E:\python\LangChain-ChatGLM-Webui\app.py", line 7, in
from duckduckgo_search import ddg
ImportError: cannot import name 'ddg' from 'duckduckgo_search'

这个是什么原因呢?

@thomas-yanxin
Copy link
Member

我记得应该是版本不对吧。

@henrry007
Copy link
Author

我记得应该是版本不对吧。

python的版本吗? 代码我是昨天下载的。

@thomas-yanxin
Copy link
Member

thomas-yanxin commented Feb 21, 2024

你试一下这个版本:duckduckgo_search==2.9.5,或者duckduckgo_search==2.9.0

pip install duckduckgo_search==2.9.5

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

2 participants