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

提示ModuleNotFoundError: No module named 'openai' #190

Closed
Mrleft123 opened this issue Feb 13, 2023 · 2 comments
Closed

提示ModuleNotFoundError: No module named 'openai' #190

Mrleft123 opened this issue Feb 13, 2023 · 2 comments

Comments

@Mrleft123
Copy link

前置确认

  1. 运行于国内网络环境,未开代理
  2. python 已安装:版本在 3.7 ~ 3.10 之间,依赖已安装
  3. 在已有 issue 中未搜索到类似问题
  4. FAQS 中无类似问题

问题描述

简要说明、截图、复现步骤等,也可以是需求或想法
能够正常运行在检测到问题的时候,提示ModuleNotFoundError: No module named 'openai'

终端日志 (如有报错)

Please scan the QR code to log in.
Please press confirm on your phone.
Loading the contact, this may take a little while.
Login successfully as lm
Start auto replying.
[ERROR][2023-02-13 09:40:00][wechat_channel.py:116] - No module named 'openai'
Traceback (most recent call last):
File "/usr/local/python/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 112, in _do_send
reply_text = super().build_reply_content(query, context)
File "/usr/local/python/chatgpt-on-wechat/channel/channel.py", line 31, in build_reply_content
return Bridge().fetch_reply_content(query, context)
File "/usr/local/python/chatgpt-on-wechat/bridge/bridge.py", line 9, in fetch_reply_content
return bot_factory.create_bot("openAI").reply(query, context)
File "/usr/local/python/chatgpt-on-wechat/bot/bot_factory.py", line 24, in create_bot
from bot.openai.open_ai_bot import OpenAIBot
File "/usr/local/python/chatgpt-on-wechat/bot/openai/open_ai_bot.py", line 6, in
import openai
ModuleNotFoundError: No module named 'openai'

[在此处粘贴终端日志]

环境

  • 操作系统类型 (Mac/Windows/Linux):Linux Centos7.6
  • Python版本 ( 执行 python3 -V ):Python 3.6.8
  • pip版本 ( 依赖问题此项必填,执行 pip3 -V):
    pip 23.0 from /usr/local/lib/python3.10/site-packages/pip (python 3.10)
@zhayujie
Copy link
Owner

你的 pip3 和 python3 不是同一个版本哈, 要看下openai安装在哪个python下,是否和你用来执行app.py的python是同一个版本。
see #88

@zhayujie zhayujie reopened this Feb 13, 2023
@Mrleft123
Copy link
Author

Mrleft123 commented Feb 13, 2023 via email

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