prophet icon indicating copy to clipboard operation
prophet copied to clipboard

Easter import error

Open sarikayamerts opened this issue 6 years ago • 23 comments

In the latest version of the holidays package (0.10.1), structure was completely changed, whereas we are calling https://github.com/facebook/prophet/blob/master/python/fbprophet/hdays.py#L14 directly from the holidays.

Please see the details of the holidays' version update. https://github.com/dr-prodigy/python-holidays/commit/721ebbc35ecadf935ec840e802890a408ef650fc#diff-d016b20073c1e0616393552c13b2647b

sarikayamerts avatar Jan 27 '20 09:01 sarikayamerts

A temporary solution is defining max version limit for holidays https://github.com/facebook/prophet/pull/1294 I'll be updating according to latest package, soon

sarikayamerts avatar Jan 27 '20 09:01 sarikayamerts

holidays==0.9 worked fine for me using prophet ==0.4

fbossolan avatar Jan 27 '20 12:01 fbossolan

Not really advisable, but I was able to get it working by removing the easter and rd imports in the days.py file

robblatt avatar Jan 27 '20 17:01 robblatt

Hi, here dr-prodigy/python-holidays#277 you'll find a fix for this issue, which is deriving from a wrong reference made to easter, which is not part of holidays.

dr-prodigy avatar Jan 27 '20 20:01 dr-prodigy

The change in imports in the holidays package has unfortunately broken importing fbprophet. We'll push out a new version to pip stat that fixes it; in the meantime, there are two options:

  1. Downgrade holidays to 0.9.12, with pip install holidays==0.9.12
  2. Install fbprophet from this repository, by cloning it and running python3 setup.py install

bletham avatar Jan 30 '20 23:01 bletham

Is there any fix of the issue? because I am still getting this error.

sahooamarjeet avatar Feb 02 '20 20:02 sahooamarjeet

Is there any fix of the issue? because I am still getting this error.

@bletham's solution (downgrading holidays or installing prophet from repo) should be working, isn't they?

sarikayamerts avatar Feb 03 '20 07:02 sarikayamerts

Having the same issue using fbprophet on a cluster on databricks. Is the pypi update expected soon? If not does anyone have any suggestions of how to build the repo for use on a databricks cluster.

ReeceCook avatar Feb 03 '20 11:02 ReeceCook

@bletham work for me, I just needed to restart de terminal

Jgonzalezh avatar Feb 03 '20 14:02 Jgonzalezh

downgrading holidays using pip install holidays==0.9.12, by itself, worked for me

sam-cannon avatar Feb 13 '20 18:02 sam-cannon

What is the status of the fix for this. I've installed using anaconda, and would prefer not mixing pip and anaconda package managers for a temporary bandaid.

sjdemoor avatar Feb 20 '20 13:02 sjdemoor

As of yesterday, the fix has been pushed to both PyPI and conda forge in the new version (0.6). Please upgrade the package and then you should no longer have this error.

If you do run into this error, make sure that you are using the latest version (0.6):

import fbprophet
print(fbprophet.__version__)

bletham avatar Feb 21 '20 20:02 bletham

I have just installed fbprophet but get the same issue with holidays. I also downgraded holidays but it didn't help. Any other suggestions?

avissens avatar Feb 27 '20 12:02 avissens

@avissens can you check what version you are using?

import fbprophet
print(fbprophet.__version__)

bletham avatar Feb 28 '20 01:02 bletham

I also just downloaded fbprophet yesterday and i am having the same issues. I used the conda forge method and i also downgraded the holiday package but it still doesnt work.

jankomah avatar Feb 28 '20 07:02 jankomah

@jankomah can you check what version you are using?

import fbprophet
print(fbprophet.__version__)

bletham avatar Feb 28 '20 18:02 bletham

@bletham My version is 0.5.

avissens avatar Feb 29 '20 19:02 avissens

@avissens you need to upgrade to v0.6. If you upgrade via pip or conda forge that should be what you get (unless you're using Python2, in which case let me know).

bletham avatar Mar 03 '20 21:03 bletham

current fresh install of conda forge has this same problem: conda install -c conda-forge fbprophet - > fbprophet 0.5 ImportError: cannot import name 'easter' from 'holidays'

mrciolino avatar Jun 10 '20 14:06 mrciolino

current fresh install of conda forge has this same problem: conda install -c conda-forge fbprophet - > fbprophet 0.5 ImportError: cannot import name 'easter' from 'holidays'

conda-forge still pointing to 0.5 but pip points to 0.6 I had to pip install fbprophet --upgrade to get 0.6

chmartin avatar Jun 10 '20 21:06 chmartin