SQLAlchemy - ModuleNotFoundError: No module named 'sqlalchemy'

Hi, I need to recover some data from a postgresql, only when I launch the app it reports me the following error:
File “/app/wtf_aggregate_interni/10_streamlit_ok.py”, line 9, in
from sqlalchemy import create_engine
ModuleNotFoundError: No module named ‘sqlalchemy’

in the file requirements.txt in the root of the project I have inserted this:
pystan==2.19.1.1
prophet==1.0.1
psycopg2==2.9.1
psycopg2-binary==2.9.1
SQLAlchemy==1.4.20
altair==4.1.0
pandas==1.2.4
scipy==1.6.3

and in the streamlit file I have this line:
from sqlalchemy import create_engine

do you know why it keeps giving me the error? thank you :slight_smile:

Hi @ibeppo993, welcome to the Streamlit community!! :wave: :partying_face:

In this case, none of the packages in your requirements file were installed due to a typo in the file name:

  1. Rename requirments.txt to requirements.txt
  2. Reboot your app

Fixing the file name should solve this issue. Let us know if it doesn’t.

Happy Streamlit’ing! :balloon:
Snehan

solved everything! thank you very much! :slight_smile:

1 Like