Error with Pandas version while deploying

While deploying my app, Streamlit forced pandas to be upgraded to 2.1.1. This caused incompatibility with ssg-sea-1.6.0 which requires pandas<1.4.3,>=1.4.1.

How can this be resolved? Thanks.

====== ERROR MESSAGE ======
Attempting uninstall: pandas
Found existing installation: pandas 1.4.2
Uninstalling pandas-1.4.2:
Successfully uninstalled pandas-1.4.2

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
**ssg-sea 1.6.0 requires pandas<1.4.3,>=1.4.1, but you have pandas 2.1.1 which is incompatible.**

========= REQUIREMENTS.TXT ============
openpyxl==3.1.2
numpy==1.22.4
pandas==1.4.2
huggingface-hub==0.0.17
scikit_learn==1.0.2
sentence_transformers==2.0.0
ssg-sea==1.6.0
streamlit==1.9.2

Hi @nutty

It seems that older streamlit version prefer to use newer version of Pandas in spite of specifying an older version in the requirements.txt.

To fix this, you’ll have to use a newer version of Streamlit. Thus, in your requirements.txt please delete the version number of 1.9.2 like so:

streamlit
openpyxl==3.1.2
numpy==1.22.4
pandas==1.4.2
huggingface-hub==0.0.17
scikit_learn==1.0.2
sentence_transformers==2.0.0
ssg-sea==1.6.0

And this should work.

I’ve validated this via:

import streamlit as st
import pandas as pd

st.write(pd.__version__)

Hope this helps!

It works. Thanks for your help.

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