🚀 Gen 5 of the leading AI app deployment platform launches October 6. Click for the livestream.

Dash File Launch Error After Heroku Installation - Dateutil mismatch

Hi,

I can’t start my Dash app like I normally do. It throws me this error:

(base) C:\Users\Dylan Mendonca\ATCOnline>python test.py
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import dash
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\dash\__init__.py", line 1, in <module>
    from .dash import Dash  # noqa: F401
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\dash\dash.py", line 22, in <module>
    import plotly
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\plotly\__init__.py", line 31, in <module>
    from plotly import (plotly, dashboard_objs, graph_objs, grid_objs, tools,
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\plotly\plotly\__init__.py", line 10, in <module>
    from . plotly import (
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\plotly\plotly\plotly.py", line 35, in <module>
    from plotly.graph_objs import Scatter
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\plotly\graph_objs\__init__.py", line 81, in <module>
    import ipywidgets
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\ipywidgets\__init__.py", line 25, in <module>
    from .widgets import *
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\ipywidgets\widgets\__init__.py", line 4, in <module>
    from .widget import Widget, CallbackDispatcher, register, widget_serialization
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\ipywidgets\widgets\widget.py", line 15, in <module>
    from ipykernel.comm import Comm
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\ipykernel\comm\__init__.py", line 1, in <module>
    from .manager import *
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\ipykernel\comm\manager.py", line 15, in <module>
    from .comm import Comm
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\ipykernel\comm\comm.py", line 9, in <module>
    from ipykernel.kernelbase import Kernel
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\ipykernel\kernelbase.py", line 19, in <module>
    from jupyter_client.session import utcnow as now
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\jupyter_client\session.py", line 61, in <module>
    from jupyter_client.jsonutil import extract_dates, squash_dates, date_default
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\jupyter_client\jsonutil.py", line 11, in <module>
    from dateutil.parser import parse as _dateutil_parse
  File "C:\Users\Dylan Mendonca\Anaconda\lib\site-packages\dateutil\parser.py", line 158
    l.append("%s=%s" % (attr, `value`))
                              ^
SyntaxError: invalid syntax

I installed Heroku today. Does that have something to do with this error?

I discovered what the issue was. Heroku requires a python-dateutil == 1.5

pandas 0.24.1 has requirement python-dateutil>=2.5.0, but you'll have python-dateutil 1.5 which is incompatible.

matplotlib 3.0.2 has requirement python-dateutil>=2.1, but you'll have python-dateutil 1.5 which is incompatible.

jupyter-client 5.2.4 has requirement python-dateutil>=2.1, but you'll have python-dateutil 1.5 which is incompatible.

bokeh 1.0.2 has requirement python-dateutil>=2.1, but you'll have python-dateutil 1.5 which is incompatible.

anaconda-client 1.7.2 has requirement python-dateutil>=2.6.1, but you'll have python-dateutil 1.5 which is incompatible.

I’m assuming that dash also has a specific python-dateutil requirement but I’m not sure what it is.

@mdylan2 What did you end up doing? I have run into the same error where heroku requires python-dateutil == 1.5 but pandas requires python-dateutil >= 2.7.3. Were you able to deploy from heroku?