From pivottablejs import pivot_ui did not run in streamlit community cloud

Sir, please find the code below. It runs perfectly fine locally, but it does not execute in Streamlit Cloud. The compilation is successful; however, after compilation, it presents an error, which you can observe in the error image. Kindly provide me with the appropriate solution. Thank you in advance for your valuable assistance.
this command give error
from pivottablejs import pivot_ui

see all in link
https://jspage.streamlit.app/

sir this is my code

import streamlit as st
import streamlit.components.v1 as components
import pandas as pd
from pivottablejs import pivot_ui
mdf = pd.DataFrame({“A”: [“foo”, “foo”, “foo”, “foo”, “foo”,
“bar”, “bar”, “bar”, “bar”],
“G”: [‘ADDA01’, ‘ADDAA2’, ‘AFFAA2’, ‘DFFDD3’, ‘DFFDD3’, ‘FDDFF4’, ‘FFFFF5’, ‘TDDTT6’, ‘RRR7’],
“E”: [2, 4, 5, 5, 6, 6, 8, 9, 9]})
t = pivot_ui(mdf)
with open(t.src) as t:
components.html(t.read(), width=900, height=1000, scrolling=True)

this is requirements.txt file
numpy
pandas
seaborn
openpyxl
pivottablejs

see error

It’s a common dependancy error.
Create a requirements.txt file and pip freeze all your dependancies.

open terminal and type
pip freeze > requirements.txt

then push changes to github if you’re using github for the deployment on streamlit cloud.

Thnk you for your reply
dear boss see error

this file give error htmlmin-0.1.12.tar.gz (19 kB)

Collecting htmlmin (from -r /mount/src/forjst/requirements.txt (line 128))
  Downloading htmlmin-0.1.12.tar.gz (19 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      Traceback (most recent call last):
        File "/home/adminuser/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
          ~~~~^^
        File "/home/adminuser/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/adminuser/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-sd36l3f0/overlay/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 "/tmp/pip-build-env-sd36l3f0/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "/tmp/pip-build-env-sd36l3f0/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 512, in run_setup
          super().run_setup(setup_script=setup_script)
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-sd36l3f0/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 4, in <module>
        File "/tmp/pip-install-pp62lhs8/htmlmin_a92cd2efc69246ddb749dc8bab388723/htmlmin/__init__.py", line 28, in <module>
          from .main import minify, Minifier
        File "/tmp/pip-install-pp62lhs8/htmlmin_a92cd2efc69246ddb749dc8bab388723/htmlmin/main.py", line 28, in <module>
          import cgi
      ModuleNotFoundError: No module named 'cgi'
      [end of output]
```Collecting htmlmin (from -r /mount/src/forjst/requirements.txt (line 128))

  Downloading htmlmin-0.1.12.tar.gz (19 kB)

  Installing build dependencies: started

  Installing build dependencies: finished with status 'done'

  Getting requirements to build wheel: started

  Getting requirements to build wheel: finished with status 'error'

  error: subprocess-exited-with-error

  

  × Getting requirements to build wheel did not run successfully.

  │ exit code: 1

  ╰─> [27 lines of output]

      Traceback (most recent call last):

        File "/home/adminuser/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>

          main()

          ~~~~^^

        File "/home/adminuser/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main

          json_out['return_val'] = hook(**hook_input['kwargs'])

                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^

        File "/home/adminuser/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel

          return hook(config_settings)

        File "/tmp/pip-build-env-sd36l3f0/overlay/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 "/tmp/pip-build-env-sd36l3f0/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires

          self.run_setup()

          ~~~~~~~~~~~~~~^^

        File "/tmp/pip-build-env-sd36l3f0/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 512, in run_setup

          super().run_setup(setup_script=setup_script)

          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "/tmp/pip-build-env-sd36l3f0/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setup

          exec(code, locals())

          ~~~~^^^^^^^^^^^^^^^^

        File "<string>", line 4, in <module>

        File "/tmp/pip-install-pp62lhs8/htmlmin_a92cd2efc69246ddb749dc8bab388723/htmlmin/__init__.py", line 28, in <module>

          from .main import minify, Minifier

        File "/tmp/pip-install-pp62lhs8/htmlmin_a92cd2efc69246ddb749dc8bab388723/htmlmin/main.py", line 28, in <module>

          import cgi

      ModuleNotFoundError: No module named 'cgi'

      [end of output]

![image|623x500](upload://4F7WUD0GcgncDNO5uCQJnkAT79f.png)