ImportError: cannot import name 'easter' from 'holidays' (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/holidays/__init__.py)
Install fine using pip3 install fbprophet
This is discussed here: https://github.com/facebook/prophet/issues/1292
Complete explanation and fix here:
https://github.com/dr-prodigy/python-holidays/issues/277
dr-prodigy's recommendation (linked above) corrected the issue for me.
Thanks guys. Downgrading holidays to 9.1.2 fixed it.
This is not the right way of fixing it.
Please consider fixing prophet code instead (as explained in my linked issue), in order to be future-proof (holidays supports new countries and features on every release).
Thanks @dr-prodigy. Made fixes in the Prophet code. Changes work fine
Is this fixed? I am still getting error with holidays==0.10.1 and fbprophet==0.5.
Please suggest.
Thanks guys. Downgrading holidays to 9.1.2 fixed it.
There is no holiday==9.1.2 version?
ERROR: Could not find a version that satisfies the requirement holidays==9.1.2 (from versions: 0.1, 0.2, 0.3, 0.3.1, 0.4, 0.4.1, 0.5, 0.6, 0.7, 0.8, 0.8.1, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.9.8, 0.9.9, 0.9.10, 0.9.11, 0.9.12, 0.10.1)
ERROR: No matching distribution found for holidays==9.1.2
Ok, below actually worked, at-least for importing fbprophet:
pip install holidays==0.9.12
Wait, what do you mean "fix it in prophet code"? Like fork it and maintain project ourselves?
I don't want to be mean but... that's just absurd! @dr-prodigy
Wait, what do you mean "fix it in prophet code"? Like fork it and maintain project ourselves?
I don't want to be mean but... that's just absurd! @dr-prodigy
Reasons for this issue have been already clarified (direct use of library internals, not meant to be accessed from outside) by me, and fixed by prophet maintainers:
https://github.com/facebook/prophet/issues/1293
-1 for a rude and not relevant nor useful comment.
@dr-prodigy I am sorry, my behavior was not acceptable.
However the issue still required me to downgrade holidays package. As it is, the project does not work "out of the box" after installation.
@dr-prodigy I am sorry, my behavior was not acceptable.
However the issue still required me to downgrade
holidayspackage. As it is, the project does not work "out of the box" after installation.
@mpodlasin it's okay thank you! 馃憤
Unfortunately, even if the fix on prophet's code has already been released some weeks ago, a new official version of it has not yet been published on PyPi, thus the error is still there when sticking to official repo versions (ie: installed via pip install ..... ) .
While the prophet package on PyPi is still outdated, temporary solutions are basically 2:
as explained by @bletham here:
https://github.com/facebook/prophet/issues/1293
That being said, I can't provide details on official release plans for prophet.
You should refer to the project maintainers for this.
Hope this helps you out: have a nice day!
to import and use fbprophet without error, you should have holidays version to be 0.9.12
then it works fine.
holidays==0.9.12
This solved it for me:
pip install fbprophet==0.6
Most helpful comment
Complete explanation and fix here:
https://github.com/dr-prodigy/python-holidays/issues/277