Error with streamlit_option_menu

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/", line 565, in _run_script
    exec(code, module.__dict__)File "/app/webpage/", line 2, in <module>
    from streamlit_option_menu import option_menu

Showing like this in my code file a already installed streamlit_option_menu import option_menu

i used these code pip install streamlit option menu like this

i also check that pip freeze
and again i try that pip install streamlit menu option in terminal that saying already satisfied but showing like these
These is my repo link GitHub - NandhipatiGanesh/webpage
any kind of intelligers help me

Repo does not exist or is private.

Sorry that repo was showing 404 i just changed to public could you please check my repo and tell me any issues in that file please

Public repo : GitHub - NandhipatiGanesh/webpage

anyway this is my code errors solved by chatgpt

import streamlit as st
from streamlit_option_menu import option_menu

as horizontal menu

selected = option_menu(
menu_title=“Main Menu”, # required
options=[“Home”, “My works”, “Contact”], # required
icons=[“house”, “book”, “envelope”], # required
menu_icon=“cast”, # optional
default_index=0, # optional

if selected == “Home”:
st.title(f"You have selected {selected}“)
if selected == “My works”:
st.title(f"You have selected {selected}”)
if selected == “Contact”:
st.title(f"You have selected {selected}")

The requirements.txt file is missing.

hii franky1

when i try to run in terminal that was working but coming to streamlit web app it was showing error

could you please elobrate about requirements.txt
i want to put like showcase

Add a requirements.txt file in the root folder of your project and add the required pip packages:


See also:

1 Like