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

openai安装失败 #30

Closed
Runaway00 opened this issue Jan 11, 2023 · 2 comments
Closed

openai安装失败 #30

Runaway00 opened this issue Jan 11, 2023 · 2 comments

Comments

@Runaway00
Copy link

[ERROR][2023-01-11 14:30:16][wechat_channel.py:115] - No module named 'openai'
Traceback (most recent call last):
File "/root/chatgpt/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 111, in _do_send
reply_text = super().build_reply_content(query, context).strip()
File "/root/chatgpt/chatgpt-on-wechat/channel/channel.py", line 31, in build_reply_content
return Bridge().fetch_reply_content(query, context)
File "/root/chatgpt/chatgpt-on-wechat/bridge/bridge.py", line 9, in fetch_reply_content
return bot_factory.create_bot("openAI").reply(query, context)
File "/root/chatgpt/chatgpt-on-wechat/bot/bot_factory.py", line 24, in create_bot
from bot.openai.open_ai_bot import OpenAIBot
File "/root/chatgpt/chatgpt-on-wechat/bot/openai/open_ai_bot.py", line 6, in
import openai
ModuleNotFoundError: No module named 'openai'

(这是一个错误消息,表明程序正在运行的环境中找不到名为'openai'的模块。
可能是因为 openai python package没有正确安装或者安装的包版本不对导致。或者程序设计中没有正确引用了openai package.
它尝试从/root/chatgpt/chatgpt-on-wechat/bot/openai/open_ai_bot.py文件中引用了openai package 但是它没有找到。
建议检查 openai package 是否已经正确安装,并确保程序正确地引用了这个包.)

@zhayujie
Copy link
Owner

openai有安装在你用于运行程序的Python下吗

假设你通过 python3.8 app.py 来启动程序,可以运行 python3.8 -m pip install --upgrade openai 来安装openai

@Runaway00
Copy link
Author

嗯嗯 解决了 谢谢啦

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