I have successfully executed my code on my local machine; however, when attempting to deploy my Streamlit application on Streamlit Cloud, I encounter errors. Please review all the errors and provide a solution for deploying my application without any issues.
see error in picture
sorry
Error at deployment time × Failed to download and build htmlmin==0.1.12
Using uv pip install.
Using Python 3.13.3 environment at /home/adminuser/venv
× Failed to download and build `htmlmin==0.1.12`
╰─▶ Build backend failed to determine requirements with `build_wheel()`
(exit status: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 14, in <module>
requires = get_requires_for_build({})
File
"/home/adminuser/.cache/uv/builds-v0/.tmp6mYvVp/lib/python3.13/site-packages/setuptools/build_meta.py",
line 331, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/adminuser/.cache/uv/builds-v0/.tmp6mYvVp/lib/python3.13/site-packages/setuptools/build_meta.py",
line 301, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File
"/home/adminuser/.cache/uv/builds-v0/.tmp6mYvVp/lib/python3.13/site-packages/setuptools/build_meta.py",
line 512, in run_setup
super().run_setup(setup_script=setup_script)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/adminuser/.cache/uv/builds-v0/.tmp6mYvVp/lib/python3.13/site-packages/setuptools/build_meta.py",
line 317, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 4, in <module>
sys.path.pop(0)
~~~~~~~~~~~~^^^
File
"/home/adminuser/.cache/uv/sdists-v6/pypi/htmlmin/0.1.12/725MaYtLqTs0HGAzo3ZYn/src/htmlmin/__init__.py",
line 28, in <module>
from .main import minify, Minifier
File
"/home/adminuser/.cache/uv/sdists-v6/pypi/htmlmin/0.1.12/725MaYtLqTs0HGAzo3ZYn/src/htmlmin/main.py",
line 28, in <module>
import cgi
ModuleNotFoundError: No module named 'cgi'
Checking if Streamlit is installed
Installing rich for an improved exception logging
Using uv pip install.
Using Python 3.13.3 environment at /home/adminuser/venv
Resolved 4 packages in 51ms
Prepared 4 packages in 104ms
Installed 4 packages in 16ms
+ markdown-it-py[2025-05-21 12:15:30.130943] ==3.0.0
+ mdurl==0.1.2
+ pygments==2.19.1
+ rich==14.0.0
──────────────────────────────────────────────────────────────────────────
this is my code
import streamlit as st
from st_aggrid import AgGrid,GridOptionsBuilder
import pandas as pd
from time import sleep
#htmlmin==0.1.12
@st.cache_resource
def load_data():
df = pd.DataFrame({‘name’ : [‘User1’, ‘User2’, ‘User3’],
‘role’ : [‘member’, ‘admin’, ‘moderator’],
‘sfee’ : [0, 0, 0]})
return df
df = load_data()
gd = GridOptionsBuilder.from_dataframe(df)
gd.configure_pagination(enabled=False)
gd.configure_default_column(editable=True, filter=True, resizable=True, sortable=True, value=True, enableRowGroup=True,
enablePivot=True, enableValue=True, floatingFilter=True, aggFunc=‘sum’, flex=1, minWidth=150, width=150, maxWidth=200)
gd.configure_selection(selection_mode=‘multiple’, use_checkbox=True)
gd.configure_column(‘Passengerid’, headerCheckboxSelection = True)
gridoptions = gd.build()
tabla = AgGrid(df, editable=True,height=300,width=‘100%’,
update_on=[‘cellValueChanged’],
reload_data=False,
gridOptions=gridoptions)
Step2: Select some rows
b2 = st.checkbox(“Filter”)
if b2:
sel_row = tabla[“selected_rows”]
if sel_row:
df_filter = pd.DataFrame(sel_row)
Step 3: Print rows selected
AgGrid(df_filter)
Could you please format your code as a code block, by putting ``` before and after your code?
Also, are you actually using htmlmin
? If not, do you have it in your requirements.txt file (or other dependency file)? What happens if you remove it?