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

Error: No module named openai in Windows #8

Open
gajuan99 opened this issue Feb 23, 2023 · 4 comments
Open

Error: No module named openai in Windows #8

gajuan99 opened this issue Feb 23, 2023 · 4 comments

Comments

@gajuan99
Copy link

Hi, when installing the plugin it asks me to install a series of packages, I accept the installation but it returns the error "ModuleNotFoundError: No module named 'openai'". I asked ChatGPT about the error and they told me to install the openai pip from cmd (pip install openai) but the problem persists. How can I solve it?

The more detailed the answer, the better. Thanks in advance.

image

@waiotahi
Copy link

Likewise

Couldn't load plugin 'QChatGPT' due to an error when calling its classFactory() method

ModuleNotFoundError: No module named 'openai'
Traceback (most recent call last):
File "C:\Users/simon/AppData/Roaming/QGIS/QGIS3\profiles\Lat37/python/plugins\QChatGPT\qchatqpt.py", line 45, in
import openai
File "C:\PROGRA1/QGIS323.0/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'openai'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\PROGRA1/QGIS323.0/apps/qgis/./python\qgis\utils.py", line 423, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:\Users/simon/AppData/Roaming/QGIS/QGIS3\profiles\Lat37/python/plugins\QChatGPT_init
.py", line 35, in classFactory
from .qchatqpt import qchatgpt
File "C:\PROGRA1/QGIS323.0/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users/simon/AppData/Roaming/QGIS/QGIS3\profiles\Lat37/python/plugins\QChatGPT\qchatqpt.py", line 51, in
import openai
File "C:\PROGRA1/QGIS323.0/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'openai'

Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
QGIS version: 3.28.0-Firenze Firenze, ed3ad0430f3

@Einavg7
Copy link

Einavg7 commented Feb 27, 2023

Hello,

I have the same issue:

Couldn't load plugin 'QChatGPT' due to an error when calling its classFactory() method

ModuleNotFoundError: No module named 'openai'
Traceback (most recent call last):
File "C:\Users/FFC-Notebook/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QChatGPT\qchatqpt.py", line 45, in
import openai
File "C:\PROGRA1/QGIS321.3/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'openai'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\PROGRA1/QGIS321.3/apps/qgis/./python\qgis\utils.py", line 423, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:\Users/FFC-Notebook/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QChatGPT_init
.py", line 35, in classFactory
from .qchatqpt import qchatgpt
File "C:\PROGRA1/QGIS321.3/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users/FFC-Notebook/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QChatGPT\qchatqpt.py", line 51, in
import openai
File "C:\PROGRA1/QGIS321.3/apps/qgis/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'openai'

Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
QGIS version: 3.28.3-Firenze Firenze, c12bcb2f76c

@shevelp
Copy link

shevelp commented Mar 9, 2023

Hi, @Einavg7 @waiotahi and @gajuan99
The error you have is because you do not have the openai python library installed, open the terminal and install it using:

pip install openai

then reinstall the plugin and you should have no problem.

@AndryZavala
Copy link

hello, When installing the plugin I get the following error The following Python packages are required to use the plugin QChatGPT: pdfgpt

and I can't install the packages using "pip install pdfgpt"

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

5 participants