Probleme with modulenotfounderror chatgpt

Hello everyone,
i’m new with streamlit and i’m tryin to deploy my app on the cloud thanks to streamlit and it occurs this error:

Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/", line 534, in _run_script
    exec(code, module.__dict__)
  File "/workspaces/chatgptetbtc/", line 1, in <module>
    import openai
ModuleNotFoundError: No module named 'openai'

I mean I’ve understood the problem it’s about the import of openai but how am i suppose to solve this problem please ? Localy, it works perfectly, i’ve only one page in this project and you can see the content of my page directly in my github :

i want to deploy my app in the cloudof streamlit.

Thank you very much for your help.


Hi @Amr_Lgh,

You’ll need to add a file called requirements.txt to your app with the following contents:


Check out our doc on this error here.

1 Like

Hi @Caroline,

Thank you very much for your help.
Problem has been solved thank you.


1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.