Unable to deploy my app, this is my first time of doing this task

If you’re creating a debugging post, please include the following info:

  1. Share the link to the public app (deployed on Community Cloud).
    https://nathemdashboard-ctcxazpsqk8cvi4jmth8pa.streamlit.app/

  2. Share the link to your app’s public GitHub repository (including a requirements file).
    ANSWER:
    GitHub - Bodundeft/nathem_dashboard
    owner=bodundeft&repo=nathem_dashboard&branch=main&mainModule=streamlit_app.py
    https://share.streamlit.io/deploy

Found existing installation: streamlit 1.22.0

  1. Share the full text of the error message (not a screenshot).


  2. Share the Streamlit and Python versions.
    C:\Users\USER\Desktop\myproject_2>streamlit --version
    Streamlit, version 1.40.2

C:\Users\USER\Desktop\myproject_2>python --version
Python 3.11.3

distutils is not available in Python>3.9.
Either update your requirements file or downgrade to using Python 3.9 in the community cloud

Thanks for your prompt response, so how do I downgrade to using Python 3.9 in the community cloud?

C:\Users\USER\Desktop\myproject_2>pip freeze > requirements.txt
WARNING: Ignoring invalid distribution ~treamlit (C:\Users\USER\anaconda_3\Lib\site-packages)

C:\Users\USER\Desktop\myproject_2>pip install -r requirements.txt
WARNING: Ignoring invalid distribution ~treamlit (C:\Users\USER\anaconda_3\Lib\site-packages)
Processing c:\b\abs_74o47svlua\croot\aiobotocore_1680004300264\work (from -r requirements.txt (line 1))
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘C:\b\abs_74o47svlua\croot\aiobotocore_1680004300264\work’

You’ll need to delete your app and redeploy it. On the deploy screen, click “Advanced settings” before you click “Deploy.”

Hey Debbie Mattews,
Thank you so much. I spent two days on this task.

God bless you abundantly, amen.

ERROR


[     UTC     ] Logs for [foodmart-ry5a2pyq8leuj9kd9wahke.streamlit.app/](http://foodmart-ry5a2pyq8leuj9kd9wahke.streamlit.app/)

────────────────────────────────────────────────────────────────────────────────────────

[14:48:17] 🖥 Provisioning machine...

[14:48:17] 🎛 Preparing system...

[14:48:17] ⛓ Spinning up manager process...

[14:48:12] 🚀 Starting up repository: 'foodmart', branch: 'main', main module: 'streamlit_app.py'

[14:48:12] 🐙 Cloning repository...

[14:48:13] 🐙 Cloning into '/mount/src/foodmart'...

[14:48:13] 🐙 Cloned repository!

[14:48:13] 🐙 Pulling code changes from Github...

[14:48:14] 📦 Processing dependencies...

──────────────────────────────────────── uv ───────────────────────────────────────────

Using uv pip install.

Using Python 3.11.11 environment at /home/adminuser/venv

error: Distribution not found at: file:///C:/b/abs_74o47svlua/croot/aiobotocore_1680004300264/work

Checking if Streamlit is installed

────────────────────────────────────────────────────────────────────────────────────────

──────────────────────────────────────── pip ───────────────────────────────────────────

Using standard pip install.

Processing /C:/b/abs_74o47svlua/croot/aiobotocore_1680004300264/work (from -r /mount/src/foodmart/requirements.txt (line 1))

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/C:/b/abs_74o47svlua/croot/aiobotocore_1680004300264/work'

[notice] A new release of pip is available: 24.0 -> 24.3.1

[notice] To update, run: pip install --upgrade pip

Checking if Streamlit is installed

────────────────────────────────────────────────────────────────────────────────────────

[14:48:17] ❗️ installer returned a non-zero exit code

[14:48:17] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.

I’m not sure. It looks like it’s trying to install something with a Windows path. Community Cloud is Linux. However, it is pointing to line one of requirements.txt, which is just altair.

As a test, try removing as many things from your requirements file as possible so pip can resolve the dependencies automatically. From a glance, maybe something as little as:

streamlit=1.22.0
streamlit_extras
altair<5

pip install cachetools click numpy packaging pandas pillow protobuf pyarrow pydeck requests rich entrypoints htbuilder markdownlit prometheus-client st-annotated-text streamlit-camera-input-live streamlit-card streamlit-embedcode streamlit-faker streamlit-image-coordinates streamlit-keyup streamlit-toggle-switch streamlit-vertical-slider

pip install cachetools click numpy packaging pandas pillow protobuf pyarrow pydeck requests rich entrypoints htbuilder markdownlit prometheus-client st-annotated-text streamlit-camera-input-live streamlit-card streamlit-embedcode streamlit-faker streamlit-image-coordinates streamlit-keyup streamlit-toggle-switch streamlit-vertical-slider

Hey Debbie,
I encountered this error


────────────────────────────────────────────────────────────────────────────────────────

[14:21:02] 📦 Processed dependencies!

cat: /mount/admin/install_path: No such file or directory

────────────────────── Traceback (most recent call last) ───────────────────────

  /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru  

  nner/exec_code.py:88 in exec_func_with_error_handling                         

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru  

  nner/script_runner.py:579 in code_to_exec                                     

                                                                                

  /mount/src/data-intelligence-dashboard/app.py:3 in <module>                   

                                                                                

     1 import streamlit as st                                                   

     2 import pandas as pd                                                      

  ❱  3 import matplotlib.pyplot as plt                                          

     4 import seaborn as sns                                                    

     5                                                                          

     6 # Define your columns list                                               

────────────────────────────────────────────────────────────────────────────────

ModuleNotFoundError: No module named 'matplotlib'

2025-01-02 14:21:35.195 Uncaught app execution

Traceback (most recent call last):

  File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling

    result = func()

             ^^^^^^

  File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec

    exec(code, module.__dict__)

  File "/mount/src/data-intelligence-dashboard/app.py", line 3, in <module>

    import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'matplotlib'

────────────────────── Traceback (most recent call last) ───────────────────────

  /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru  

  nner/exec_code.py:88 in exec_func_with_error_handling                         

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru  

  nner/script_runner.py:579 in code_to_exec                                     

                                                                                

  /mount/src/data-intelligence-dashboard/app.py:3 in <module>                   

                                                                                

     1 import streamlit as st                                                   

     2 import pandas as pd                                                      

  ❱  3 import matplotlib.pyplot as plt                                          

     4 import seaborn as sns                                                    

     5                                                                          

     6 # Define your columns list                                               

────────────────────────────────────────────────────────────────────────────────

ModuleNotFoundError: No module named 'matplotlib'

2025-01-02 14:26:01.035 Uncaught app execution

Traceback (most recent call last):

  File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling

    result = func()

             ^^^^^^

  File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec

    exec(code, module.__dict__)

  File "/mount/src/data-intelligence-dashboard/app.py", line 3, in <module>

    import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'matplotlib'

2025-01-02 14:26:01.093 503 GET /script-health-check (127.0.0.1) 71.56ms

[14:26:01] ❗️ 

────────────────────── Traceback (most recent call last) ───────────────────────

  /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru  

  nner/exec_code.py:88 in exec_func_with_error_handling                         

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru  

  nner/script_runner.py:579 in code_to_exec                                     

                                                                                

  /mount/src/data-intelligence-dashboard/app.py:3 in <module>                   

                                                                                

     1 import streamlit as st                                                   

     2 import pandas as pd                                                      

  ❱  3 import matplotlib.pyplot as plt                                          

     4 import seaborn as sns                                                    

     5                                                                          

     6 # Define your columns list                                               

────────────────────────────────────────────────────────────────────────────────

ModuleNotFoundError: No module named 'matplotlib'

2025-01-02 14:26:06.019 Uncaught app execution

Traceback (most recent call last):

  File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling

    result = func()

             ^^^^^^

  File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec

    exec(code, module.__dict__)

  File "/mount/src/data-intelligence-dashboard/app.py", line 3, in <module>

    import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'matplotlib'

2025-01-02 14:26:06.187 503 GET /script-health-check (127.0.0.1) 175.06ms

────────────────────── Traceback (most recent call last) ───────────────────────

  /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru  

  nner/exec_code.py:88 in exec_func_with_error_handling                         

                                                                                

  /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru  

  nner/script_runner.py:579 in code_to_exec                                     

                                                                                

  /mount/src/data-intelligence-dashboard/app.py:3 in <module>                   

                                                                                

     1 import streamlit as st                                                   

     2 import pandas as pd                                                      

  ❱  3 import matplotlib.pyplot as plt                                          

     4 import seaborn as sns                                                    

     5                                                                          

     6 # Define your columns list                                               

────────────────────────────────────────────────────────────────────────────────

ModuleNotFoundError: No module named 'matplotlib'

2025-01-02 14:26:11.078 Uncaught app execution

Traceback (most recent call last):

  File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling

    result = func()

             ^^^^^^

  File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec

    exec(code, module.__dict__)

  File "/mount/src/data-intelligence-dashboard/app.py", line 3, in <module>

    import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'matplotlib'

2025-01-02 14:26:11.204 503 GET /script-health-check (127.0.0.1) 132.35ms

Attached are the logs for reviews

(Attachment logs-bodundeft-data-intelligence-dashboard-main-app.py-2025-01-02T14_26_50.162Z.txt is missing)

Try adding matplotlib to your requirements file. It’s not included as a dependency of Streamlit.