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' #47

Closed
SerMs opened this issue Feb 5, 2023 · 12 comments
Closed

ModuleNotFoundError: No module named 'openai' #47

SerMs opened this issue Feb 5, 2023 · 12 comments

Comments

@SerMs
Copy link

SerMs commented Feb 5, 2023

扫码之后测试中报错ModuleNotFoundError: No module named 'openai'

@zhayujie
Copy link
Owner

zhayujie commented Feb 6, 2023

这个是openai没有安装,要确认安装在用于启动程序的python下

如果你使用python3.8 app.py 来启动程序,可以通过 python3.8 -m pip show openai 来查看是否安装。

@SerMs
Copy link
Author

SerMs commented Feb 6, 2023

image
不好意思,在麻烦请你再看看这个问题

@SerMs
Copy link
Author

SerMs commented Feb 6, 2023

好像一直安装不上

@zhayujie
Copy link
Owner

zhayujie commented Feb 6, 2023

执行 pip3 --version 看看 pip3的版本

python3 --version 有输出吗
python3.7 --version呢

@SerMs
Copy link
Author

SerMs commented Feb 6, 2023

image

@zhayujie
Copy link
Owner

zhayujie commented Feb 6, 2023

你现在 pip3 和 python3 用的都是python3.6的

需要先把安装好的 python3.7.15 配置到环境变量中,这个查一下应该很好弄
需要达到的效果: python3 --version 可以显示 python3.7.15 或者 python3.7 --version能够成功执行

@SerMs
Copy link
Author

SerMs commented Feb 6, 2023

好的好的,谢谢

@SerMs
Copy link
Author

SerMs commented Feb 6, 2023

image
你好,请问这样可以了吗

@zhayujie
Copy link
Owner

zhayujie commented Feb 6, 2023

也可以,稍微麻烦一点点,因为你的python3和pip3指向的还是 python3.6

所以你需要这样来安装依赖
python3.7 -m pip install xxxx

这样来启动程序
python3.7 app.py

@SerMs
Copy link
Author

SerMs commented Feb 6, 2023

image
是不是我环境还没配好的问题啊,还是抓不到openai的资源包

@zhayujie
Copy link
Owner

zhayujie commented Feb 6, 2023

是的,看起来你的 python3.7安装有点问题, 你先查一下报错信息看看能不能解决

@zhayujie
Copy link
Owner

zhayujie commented Feb 6, 2023

已解决

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