App Deployment Module Error

I am trying to deploy a “test app” to see how the deployment process works and it is not a very complex app, but does include some libraries outside of Streamlit which I have included in a requirements.txt file and have uploaded everything to my git repo. I keep getting this error when trying to deploy this app and I don’t know why.

here is my main code

import streamlit as st
import pandas as pd
import streamlit_pandas as sp
import numpy as np
import matplotlib.pyplot as plt
import altair as alt

st.set_page_config(page_title= "LETREP25", layout= "wide")
st.title('LETREP25 Dashboard' )
st.subheader('Raw Data')
st.text('For the Physician')
df = pd.read_csv('TestData.csv')
df=df.set_index("Hour")

fig, ax= plt.subplots()
ax = df.plot.barh
st.title('Patient ROM Data')
st.bar_chart(df)

I don’t see any requirements.txt file in your repository. To understand how to install dependencies, see App dependencies for your Community Cloud app - Streamlit Docs

this is the new error

Please can you post the complete error logs from the Cloud Logs on the right as formatted text? Screenshots are harder to work with and are often cut off.

General advice here is to check your package versions. I see pandas in the limited stack trace, but I can’t read the ValueError on the right which starts with num.....

ValueError: numpy.dtype size changed, may indicate binary incompatibility.
Expected 96 from C header, got 88 from PyObject
2025-01-21 20:08:41.465 Uncaught app execution
Traceback (most recent call last):
File “/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py”, line 88, in exec_func_with_error_handling
result = func()
^^^^^^
File “/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 579, in code_to_exec
exec(code, module.dict)
File “/mount/src/testplot/letrepstreamlit.py”, line 2, in
import pandas as pd
File “/home/adminuser/venv/lib/python3.12/site-packages/pandas/init.py”, line 22, in
from pandas.compat import is_numpy_dev as _is_numpy_dev # pyright: ignore # noqa:F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/adminuser/venv/lib/python3.12/site-packages/pandas/compat/init.py”, line 18, in
from pandas.compat.numpy import (
File “/home/adminuser/venv/lib/python3.12/site-packages/pandas/compat/numpy/init.py”, line 4, in
from pandas.util.version import Version
File “/home/adminuser/venv/lib/python3.12/site-packages/pandas/util/init.py”, line 2, in
from pandas.util._decorators import ( # noqa:F401
File “/home/adminuser/venv/lib/python3.12/site-packages/pandas/util/_decorators.py”, line 14, in
from pandas._libs.properties import cache_readonly
File “/home/adminuser/venv/lib/python3.12/site-packages/pandas/_libs/init.py”, line 13, in
from pandas._libs.interval import Interval
File “pandas/_libs/interval.pyx”, line 1, in init pandas._libs.interval
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
2025-01-21 20:08:41.639 503 GET /script-health-check (127.0.0.1) 212.79ms

You may need numpy<2. Note that streamlit-pandas seems to be abandoned, expect more compatibility issues in the future.

what do I need to do to get that? pip install? I’m a very beginner coder.

Specify numpy<2 in your requirements file.

1 Like

awesome! Thank you.

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