ModuleNotFoundError: No module named 'snowflake' getting error in streamlit

#import python
import streamlit as st
from snowflake.snowpark.functions import col

Write directly to the app

st.title(“:cup_with_straw: Customize your smoothies!:cup_with_straw:”)
“”“Choose the fruit you want in your custom smoothie.

#option = st.selectbox(‘Select any One:’, (“Banana”, “Apple”))
#st.write(‘Your selected option:’, option)

name_on_order = st.text_input(‘Name on Smoothie:’)
st.write(‘The name of your smoothie will be:’, name_on_order)

cnx = st.connection(“snowflake”)
session = cnx.session()
my_dataframe = session.table(“smoothies.public.fruit_options”).select(col(‘FRUIT_NAME’))
#st.dataframe(data = my_dataframe, use_container_width=True)

ingredients_list = st.multiselect(‘Select 5 Ingridients:’, my_dataframe,
max_selections =5)

if ingredients_list:

ingredients_string = ''

for frutis_choosen in ingredients_list:
    ingredients_string += frutis_choosen+' '


my_insert_stmt = """ insert into smoothies.public.orders(ingredients,name_on_order)


time_to_insert = st.button('Submit Order')

if time_to_insert:
    st.success('Your Smoothie is ordered, '+name_on_order+' !', icon="✅")



────────────────────── Traceback (most recent call last) ───────────────────────

ner/ in _run_script

/mount/src/melanies_smoothies/ in
1 #import python
2 import streamlit as st
❱ 3 from snowflake.snowpark.functions import col
5 # Write directly to the app
6 st.title(“:cup_with_straw: Customize your smoothies!:cup_with_straw:”)
ModuleNotFoundError: No module named ‘snowflake’

Hi @Manikanta

Looking at the provided output, it seems to be an issue with a dependent library which in this case is snowflake-snowpark-python. It also seems that you have already defined this in the requirements.txt file. Have you tried rebooting the app? Often times, when dependent libraries are modified after an app has been deployed, it may need a reboot to ensure that they are given the chance to install during the booting up phase.

Also check out our FAQ post on the topic:

Thanks @dataprofessor for your reply. As you explained, I rebooted many time , but not worked. Because, I saved file name as “requirememts.txt” instead of “requirements.txt”. But, your reply helped me a lot.

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