ModuleNotFoundError: No module named 'numpy'

Consistently getting the following stacktrace when attempting to deploy my app to Streamlit cloud.

File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/type_util.py", line 40, in <module>

    import numpy as np

ModuleNotFoundError: No module named 'numpy'

Numpy is a dependency of pandas which I had defined in my Pipfile but after getting the error the first time I explicitly declared numpy as a dep.

The contents of my Pipfile (which is at the top if my directory) are as follows:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
streamlit = "*"
pandas = "*"
openpyxl = "*"
plotly = "*"
numpy = "*"

[dev-packages]

[requires]
python_version = "3.7"

You can view the source code of my app here: GitHub - sambradbury/btcBasis: Simple app to calcuate and visualize cost basis of your bitcoin holdings.

I’ve deployed an app with nearly the exact same set of dependencies within the last few weeks so I’m wondering if the recent release of st.cache_data function which I am using broke something.

I’ve tried defining the python version as 3.8, 3.9, and 3.10 during deployment.

I just deployed your app without issues. Python 3.10, Streamlit 1.18.1.

You’re right, for some reason it worked for me this morning.

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