Cannot import name 'easter' from 'holidays'

I faced this problem, googled and solved it. For solution, do the followings;

  1. Open python3.6/site-packages/fbprophet/hdays.py file.
  2. Replace

    from holidays import WEEKEND, HolidayBase, easter, rd

to

    from holidays import WEEKEND, HolidayBase
    from dateutil.easter import easter
    from dateutil.relativedelta import relativedelta as rd

This is a recent known error that has been reported. (look here for the thread).

The reason and outline is -

"easter" is not a holidays function, but instead a dateutil library function. Until the previous version of holidays (0.9.12) it was "accidentally" accessible, due to it being imported in holidays.py (main library module, now removed in favour of single country modules), but its direct reference made in prophet is basically wrong (same goes for WEEKEND, HolidayBase etc., not meant for being accessed from outside holidays library).
In order to fix fbprophet, replacing the erroring import with

from dateutil.easter import easter


I'm using anaconda, and the only solution that worked for me was:

Replace line 16 in fbprophet/hdays.py (\AppData\Local\Continuum\anaconda3\Lib\site-packages\fbprophet\hdays.py):

from holidays import WEEKEND, HolidayBase, easter, rd

to

from holidays import WEEKEND, HolidayBase
from dateutil.easter import easter
from dateutil.relativedelta import relativedelta as rd