Gspread module not found error when deploying to


When trying to deploy my streamlit app, I received the following error:

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/", line 556, in _run_script
    exec(code, module.__dict__)File "/app/project-three/", line 1, in <module>
    import gspread

I made sure that the module is downloaded and installed in my Python coding environment, before trying to deploy to What could be causing this?
Thanks in advance.

When you deploy to the cloud, you are then using an environment in the cloud to run your app.

Anything you need to pip install besides Streamlit to run your app needs to be included in a requirements.txt file alongside your file. If there are other (non-python) things that the environment needs, you’ll need to deal with a packages.txt file, too.

1 Like