Streamlit python-dateutil 2.8.0 problem when pushing heroku app


I’m really new to the coding world so sorry in advance if I say anything inconsistent.

I’ve been using streamlit with python and works just fine. Recently I tried to host the web app with heroku but it always give me this error when pushing it to the web:

ERROR: streamlit 0.56.0 has requirement python-dateutil<=2.8.0, but you’ll have python-dateutil 2.8.1 which is incompatible.

I’ve trayed to unistall python-dateutil 2.8.1 or /and all python-dateutil and install then python-dateutil 2.8.0 but didn’t work (keep me saying I have python-dateutil 2.8.1)

Is there any solution? I 've readed this error was solved

Thanks in advance

Hello @Sampa and welcome to the forums :slight_smile:

May I ask you how your requirements.txt file is structured ? If I recall correctly Heroku is going to install all packages you specified in this file (see this link), so you may be able to force the install of the correct python-dateutil by adding python-dateutil==2.8.0 in the file.

Personnally I’m a fan of using pip-tools to pin dependency versions, so you can put all the packages you need in a like

<other packages>

and run pip-compile to generate a requirements.txt with all the packages and versions compiled, ready to push to heroku, that way you don’t have to break your head on looking for who installs the wrong version.

This way will tell you which package tries to install python-dateutil 2.8.1 in conflict with Streamlit 0.56’s python-dateutil, should pip-compile return an error.

Hope that works for you !

1 Like

Sorry for my late response. Many thanks for the info, I’ve finally make it work modifying the requirements file by specifying: python-dateutil==2.8.0