Error with streamlit_option_menu

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)File "/app/webpage/page.py", 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
orientation=“horizontal”,
)

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:

streamlit-option-menu

See also:

1 Like

me also getting same error u can plz verify this.

the github repo: “”“”“” GitHub - Iliyas-16/mdps_ml “”“”“”

ModuleNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).

Traceback:

File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)File "/mount/src/mdps_ml/mdps_public.py", line 5, in <module>
    from streamlit_option_menu import option_menu

hi franky
please slove it in ur system.

Typo: requirments.txt

numpy==1.24.3
pickle-mixin==1.0.2
streamlit==1.28.2
streamlit-option-menu==0.3.6
scikit-learn==1.3.2

I get this version , we i can modify it pls tell me.

Typo in file name: requirements.txt

Thank u so much i deploy it.

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