azure函数部署失败,python库fbprophet构建错误



我使用vscode来部署我的python函数到azure,但是,安装requirements.txt中的库时,部署失败了。似乎在构建fbprophet

之前应该安装numpy
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'

这是我的requirements.txt:

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

如有任何建议,不胜感激。

请使用最新版本的numpy。您只需要删除">requirements.txtnumpy的版本号。"。当您将该功能部署到azure时,它将自动安装最新版本。

在">requirements.txt中将numpy==1.19.2更改为numpy"。

相关内容

  • 没有找到相关文章

最新更新