-3

I am using vscode to deploy my python function to azure, however the deploy failed with installing libs in requirements.txt. It seems the numpy should be installed before building fbprophet

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 "", line 1, in
File "/tmp/pip-install-k7ex0yi4/fbprophet/setup.py", line 122, in
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
from fbprophet.forecaster import Prophet
File "/tmp/pip-install-k7ex0yi4/fbprophet/fbprophet/forecaster.py", line 14, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'

Here's my requirements.txt:

 pandas==1.1.3
    numpy==1.19.2
    pystan==2.19.1.1
    fbprophet==0.7.1

Any suggestion would be appreciated.

Daniel
  • 1

1 Answers1

0

Please use the latest version of numpy. You just need to remove the version number of numpy in "requirements.txt". It will install the latest version automatically when you deploy the function to azure.

Change numpy==1.19.2 to numpy in "requirements.txt".

Hury Shen
  • 14,948
  • 1
  • 9
  • 18