Streamlit deploy problem ImportError of common python packages

Did not resolve the issue for me. I wonder if it’s something on your end. I suppose I can switch to pip in requirements.txt, but I’d rather stick with conda. Thanks.

Hello there sir i am facing issues while deployment of my application, the error is that error while installing requirements.

Kindly sir help me out

@blackary: thanks for the suggestion but it doesn’t solve the problem yet.

1 Like

@LuanNguyen We’ve been able to deploy the app here without issues:

Could you try deleting and redeploying with python 3.9?

@blackary I do not mean to take attention away from @LuanNguyen , but I am chiming in because I am experiencing the same problem. I tried redeploying with 3.9 even before I changed packages.txt, but to no avail. My code is at . Thanks!

The app is here

1 Like

I have a similar issue. Running the app on my system works fine. But once I deploy it on the cloud, importing seaborn causes the error. Matplotlib works, inlcuding

in my environment.yml does not solve the problem.

Maybe there is an update since this was first posted?

Thank you!

@Amina and @blahblahblah Can you post your code in a public repo where I can see it?

1 Like

Hey @blackary,

I put up a minimal example here.
Please let me know if this is sufficient.

Thank you!

Thanks @Amina! I’ll take a look.

@Amina It seems to be working for me – are you experiencing something different from what that is showing?

@blackary I made the repo public. Thanks.

I run into the same problem with: GitHub - IsoldeGlissenaar/example_streamlit

I get errors when trying to use scipy or matplotlib

ImportError: /usr/lib/x86_64-linux-gnu/ version `GLIBCXX_3.4.29' not found

I could still do with some help! Should I start a new thread?

See my pull request on github, should work now.

Thanks for helping! I see your solution is using pip install instead of conda. Only problem is that what I’ve shared here is a quick example, but in my actual project I’m using cartopy, which is a bit of a mess to install using pip… I’ll give it a try but if anyone finds a solution using conda I’ll be happy to hear it!

It should be possible with conda as well as with pip. If you provide me with a real project on github, I can help.

Okay, thanks.

This is the real project:

The page I made ( looks fine on the homepage because I’m not applying scipy or matplotlib yet. If you click on ‘archive’ in the sidebar though it crashes when trying to use matplotlib.

Tried to fix your issues, see my github fork:

However, it still does not work on streamlit cloud. IMHO the problem is not matplotlib or cartopy, it seems to be the format of the data files in the data folder, read by the xarray library. They are probably in a strange or new HDF5 format variant.

@blackary @Isolde @Amina
I switched from conda to pip (requirements.txt) and the problem solved itself.
So, this is definitely a conda-related issue. Also, this means that if you find a way to get away from conda for your app, you likely won’t experience this problem.

1 Like

@blackary @Isolde @blahblahblah

Thank you all! I did the same, using a requirements.txt -file instead of the conda env.yml produces the expected output on the streamlit cloud.

1 Like