Search code examples
pythondeploymentcloudpyodbcstreamlit

Why Streamlit sharing pyodbc error when deploy?


I have a simple streamlit app that connects to an SQL server with pyodbc. it's working fine locally but when I try to deploy on streamlit Cloud I have this error:

    import pyodbc
    ModuleNotFoundError: No module named 'pyodbc' 

in my Git I have the requirement.txt that contains:

  • networkx==3.0
  • streamlit==1.11.1
  • pyodbc==4.0.30
  • pandas==1.0.5
  • numpy==1.22.0
  • matplotlib==3.2.2

And I have also the packages.txt that contains:

  • unixodbc-dev

Someone Knows what's wrong in the deployment process?

Thanks!


Solution

  • The requirements file should be named "requirements.txt" rather than "requirement.txt"