Installation Issue with Prophet and holidays package
imsid22 opened this issue · 0 comments
Issue Description:
I'm encountering an installation issue with Prophet 1.1.4 on Python 3.9 running on an EC2 instance. I've also tried installing holidays version 0.33 as a prerequisite. However, I'm still facing an installation error.
Steps to Reproduce:
Created a clean Python 3.9 virtual environment.
Ran pip install -r requirements.txt with prophet==1.1.4 and holidays==0.25 listed in the requirements file.
Encountered the error mentioned below.
Error Message
`Building wheels for collected packages: prophet
Building wheel for prophet (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [57 lines of output]
/tmp/pip-install-l0176ce_/prophet_0928031af6a44149b70ab80252358742/setup.py:10: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import (
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/prophet
creating build/lib/prophet/stan_model
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-l0176ce_/prophet_0928031af6a44149b70ab80252358742/setup.py", line 123, in
setup(
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/init.py", line 103, in setup
return distutils.core.setup(**attrs)
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
super().run_command(command)
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/wheel/bdist_wheel.py", line 364, in run
self.run_command("build")
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
super().run_command(command)
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/distutils/command/build.py", line 131, in run
self.run_command(cmd_name)
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
super().run_command(command)
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/setuptools/distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-install-l0176ce/prophet_0928031af6a44149b70ab80252358742/setup.py", line 48, in run
build_models(target_dir)
File "/tmp/pip-install-l0176ce/prophet_0928031af6a44149b70ab80252358742/setup.py", line 36, in build_models
from prophet.models import StanBackendEnum
File "/tmp/pip-install-l0176ce/prophet_0928031af6a44149b70ab80252358742/prophet/init.py", line 8, in
from prophet.forecaster import Prophet
File "/tmp/pip-install-l0176ce/prophet_0928031af6a44149b70ab80252358742/prophet/forecaster.py", line 17, in
from prophet.make_holidays import get_holiday_names, make_holidays_df
File "/tmp/pip-install-l0176ce/prophet_0928031af6a44149b70ab80252358742/prophet/make_holidays.py", line 14, in
import prophet.hdays as hdays_part2
File "/tmp/pip-install-l0176ce/prophet_0928031af6a44149b70ab80252358742/prophet/hdays.py", line 925, in
class TU(Turkey):
File "/home/ec2-user/myenv/lib64/python3.9/site-packages/holidays/registry.py", line 175, in init
raise TypeError(
TypeError: This is a python-holidays entity loader class. For entity inheritance purposes please import a class you want to derive from directly: e.g., from holidays.countries import Entity
or from holidays.financial import Entity
.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for prophet
Running setup.py clean for prophet
Failed to build prophet
ERROR: Could not build wheels for prophet, which is required to install pyproject.toml-based projects`
What I've Tried:
- Checked Python version (3.9)
- Installed dependencies individually
- Created a new virtual environment
- Updated setuptools and wheel
Questions:
- Are there known compatibility issues that could be causing this?
- Is there a workaround to successfully install Prophet in my environment?
Thank you!