Pip upgrade

Hello people,
Recently I started to get the following message every time I reboot the app (https://share.streamlit.io/larryprato/covid_dashboard/main/covid_dashboard.py):
“WARNING: You are using pip version 21.0.1; however, version 21.1.1 is available.
You should consider upgrading via the ‘/home/appuser/venv/bin/python -m pip install --upgrade pip’ command.”

I don’t know how to proceed to do such upgrade. As a consequence the format text had changed in some titles and charts.
Waht can I do? Where should I do that update?
Please, someone who can give me a hand in that issue.

Larry

Do nothing. It is just a warning and does not affect the proper pip package installation.

Hi @LarryPrato, welcome to the Streamlit community!

The pip upgrade message is unrelated to the text changing in some way. What I suspect is happening is that the version of the Streamlit library on sharing is different than you developed with. Do you have a requirements.txt file with a specific version of Streamlit pinned?

Best,
Randy

@randyzwitch Correct me if I’m wrong.
I have also had this warning in all my Streamlit Sharing apps for the past few weeks.
To my knowledge the Streamlit Sharing runtime has the following python version:

3.7.10 (default, Apr 10 2021, 16:10:05) [GCC 8.3.0]

This contains the pip version: 21.0.1
However, since the end of April, there is a newer pip version in the pypi repository: 21.1.1
If the Streamlit Sharing runtime does not update the pip version itself during deployment, then this warning above appears.

I don’t know the versions specifically, but that sounds right. That warning comes from pip any time there is a new version available, but it’s unrelated to anything about Streamlit. The only thing that can change how a Streamlit app looks for the same Python code would be using a different version of Streamlit.

I’m not quite sure what happens under the hood when you deploy a streamlit app to streamlit sharing.
I guess container images are built and launched on kubernetes.
But it seems to make a difference if I deploy an app for the first time or if I reboot or change an already existing app.

This is correct, we use the same container image (until we upgrade for whatever reason). pip itself decides to check whether there is a new version available.

For a currently running container, nothing happens, it stays with the Python libraries that are installed. The next time an app gets restarted, then the pip process happens again, which checks to see if it can be updated. But this is a Python thing, not a Streamlit one.

I would slightly disagree. :wink:
This is neither a Python nor a Streamlit thing.

It depends on what exactly happens during the initial or repeated deployment of an app on the Streamlit Sharing infrastructure. Some shell commands are obviously executed in the background!?

I’m not sure the distinction you are making here. Every reboot of a Streamlit app, a new container is built. That container will run a pip install -r requirements.txt file, and it is at that step that pip will check if there is a new version, and display the prompt.

Streamlit sharing doesn’t care what version of pip you are using.

Hi randyzwitch and Franky1,
The solution for my issue was add the line “streamlit==0.75.0” in the requirement.txt. After that the app runs perfectly.
Thanks,
Larry

1 Like