Hi, am trying day 3 streamlit ai challenge and getting below error. Doing on snowflake streamlit app
File “/tmp/appRoot/streamlit_app.py”, line 2, in from openai import OpenAI
guidelines mentioned no special setup needed if doing on snowflake
Hi, am trying day 3 streamlit ai challenge and getting below error. Doing on snowflake streamlit app
File “/tmp/appRoot/streamlit_app.py”, line 2, in from openai import OpenAI
guidelines mentioned no special setup needed if doing on snowflake
Hey there, thanks for joining the Streamlit AI Challenge and for your question!
You’re in the right place for help. The error you’re seeing, ModuleNotFoundError: No module named ‘openai’, means the openai package isn’t available in your Snowflake Streamlit app environment.
In Snowflake’s Streamlit integration, you don’t need to upload or zip Python packages manually. Instead, you should add openai as a package in the app’s “Find packages” UI—just search for openai and add it directly. This is the recommended way, as confirmed in the forum and official docs. No extra setup or zipping is needed—just select the package from the available list and it will be installed for your app automatically. If you need a specific version, you can select it from the dropdown after searching for openai in the package manager UI. For more, see the official Streamlit docs and forum guidance.
If you still see the error after adding openai via the UI, double-check that you selected the correct version and that your import statement matches the installed version’s API (for openai>=1.0.0, use from openai import OpenAI). If you have code or repo links, please share them for more targeted help, and feel free to encourage others to jump in with their tips!
Sources: