azure-functions-python-worker
azure-functions-python-worker copied to clipboard
Fail to deploy with python library fbprophet
I am using vscode to deploy my python function to azure, however the deploy failed with installing libs in requirements.txt Here's my requirements.txt
pandas==1.1.3 numpy==1.19.2 pystan==2.19.1.1 fbprophet==0.7.1
errors as below:
[08:42:05+0000] Building wheels for collected packages: fbprophet
4:42:05 PM AtomPythonFunctionCollection-Stage: [08:42:05+0000] Building wheel for fbprophet (setup.py): started
ERROR: Command errored out with exit status 1:
command: /tmp/oryx/platforms/python/3.8.6/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k7ex0yi4/fbprophet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k7ex0yi4/fbprophet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-smrcx8qz
cwd: /tmp/pip-install-k7ex0yi4/fbprophet/
08:42:05+0000] Building wheel for fbprophet (setup.py): finished with status 'error'
Complete output (40 lines):
running bdist_wheel
08:42:05+0000] Running setup.py clean for fbprophet
running build
running build_py
creating build
creating build/lib
creating build/lib/fbprophet
creating build/lib/fbprophet/stan_model
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-k7ex0yi4/fbprophet/setup.py", line 122, in <module>
setup(
File "/tmp/oryx/platforms/python/3.8.6/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/tmp/oryx/platforms/python/3.8.6/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/tmp/oryx/platforms/python/3.8.6/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/tmp/oryx/platforms/python/3.8.6/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/oryx/platforms/python/3.8.6/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 290, in run
self.run_command('build')
File "/tmp/oryx/platforms/python/3.8.6/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/tmp/oryx/platforms/python/3.8.6/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/oryx/platforms/python/3.8.6/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/tmp/oryx/platforms/python/3.8.6/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/tmp/oryx/platforms/python/3.8.6/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-k7ex0yi4/fbprophet/setup.py", line 48, in run
build_models(target_dir)
File "/tmp/pip-install-k7ex0yi4/fbprophet/setup.py", line 36, in build_models
from fbprophet.models import StanBackendEnum
File "/tmp/pip-install-k7ex0yi4/fbprophet/fbprophet/__init__.py", line 8, in <module>
from fbprophet.forecaster import Prophet
File "/tmp/pip-install-k7ex0yi4/fbprophet/fbprophet/forecaster.py", line 14, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
Does anyone has idea?
Hi @DanielLikeU , Let us know if you are still facing this error. Can we know the repro steps, so that we can repro it from our end
I've been looking into errors with dbprophet for a few hours and this seems quite common. It seems to error installing dependencies (pystan on Windows is the one I'm struggling with for different reasons). Maybe check the version of numpty your installing or one suggestion was to add dbprophet twice. You'll find these on the fbprophet github issues.
I'm having a similar issue deploying prophet to Azure. My import libs as follows.
import json import logging import numpy as np import pandas as pd from prophet import Prophet import azure.functions as func
I've removed versions from requirements.txt for these libs as follows pystan numpy pandas prophet
No errors building and running locally. Using python3.9. Set python to 3.7 via az cli, still fails to deploy.
Errors seen when deploying to Azure. ERROR: Command errored out with exit status 1: Building wheel for pystan (setup.py): finished with status 'error' ERROR: Failed building wheel for pystan Building wheel for prophet (setup.py): started ERROR: Command errored out with exit status 1: Building wheel for prophet (setup.py): finished with status 'error' ModuleNotFoundError: No module named 'numpy' ERROR: Failed building wheel for prophet
Sorry for the issues you are facing .. will take a look at it and update the thread accordingly