Unable to install correct version of dependency

Hi everyone,

My app was running fine until recently and now gives error as I required to change some dependency versions. The app will work fine if I can install numpy version 1.20. I use requirements.txt and have numpy==1.20.0 line. When deploying the app, it first downloads the correct version, but then uninstalls it and downloads the latest version (1.24.3).

Thanks,
Metin

Hi @mb3636,

Thank you for sharing your question with the community!

Your post is missing a code snippet and a link to your app’s GitHub repo. Please check out our guidelines on how to post an effective question here and update your post to help the community answer your question.

Hi Caroline,

Thanks for the reply!

I have a minimal working example in this repo. The app is here. Although my requirements asks for numpy version less than 1.22, the app shows that the imported numpy version is 1.24.3.

Thanks,
Metin

I’ve seen a couple other users with this issue for pandas. It seems to resolve if you allow Community Cloud to use the latest version of Streamlit, but otherwise it’s a bug…

I pinged the Community Cloud team to make sure the bug report is on their radar.

1 Like

Thank you, @mathcatsand, for your response and solution. I would like to add an additional tip for those seeking a solution: make sure to include “streamlit” as the first line in your requirements file. I am not sure if order of packages in requirements.txt is important but in my specific case, having “streamlit” listed later in the file did not yield the desired outcome.

Thanks for pinging the Community Cloud team. I did my best to flush out all the steps of what was going wrong. Hopefully it will help in identifying the solution quickly

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