I am experiencing an issue with my code, which runs perfectly on localhost:8501. However, upon deployment, I encounter an error stating “No module named ‘openpyxl’.” I would like to clarify that I do not utilize OpenPyXL for Excel operations. Could you please provide guidance on how to resolve this issue and successfully deploy my test application on the Streamlit server?
this is my coe
import streamlit as st
import pandas as pd
url = “student.xlsx - Google Sheets”
file_id = url.split(“/”)[-2]
path1 = “https://drive.google.com/uc?export=download&id=” + file_id
sce = pd.read_excel(path1)
st.write(sce)
this is error
ModuleNotFoundError: No module named ‘openpyxl’
During handling of the above exception, another exception occurred:
────────────────────── Traceback (most recent call last)
/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptru
nner/exec_code.py:88 in exec_func_with_error_handling
/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptru
nner/script_runner.py:579 in code_to_exec
/mount/src/mdemo/stexcel.py:7 in
4 url = “https://docs.google.com/spreadsheets/d/1-6-dNTXR3YLAvRIDRWf9DQsdX
5 file_id = url.split(”/")[-2]
6 path1 = “https://drive.google.com/uc?export=download&id=” + file_id
❱ 7 sce = pd.read_excel(path1)
8 st.write(sce)
9
/home/adminuser/venv/lib/python3.12/site-packages/pandas/io/excel/_base.py:4
95 in read_excel
