使用Azure功能安装先知时出错

发布于 2025-02-05 07:46:09 字数 336 浏览 5 评论 0原文

我在Azure上安装先知时面临错误。 实际上,我想安装先知模块以在我的Azure功能中运行它,但是当我将它们添加到我的要求并部署整个项目时,我会收到以下错误时,此模块要求其他人安装,例如Pystan和Cython。 即使在本地运行时,也会显示此错误。 有什么办法可以安装这些软件包而无需任何错误? 还是我们可以使用当地的Conda环境并将其用于Azure?

PS:我使用Python 3.8.13在本地创建一个Conda环境并安装了所有软件包,该功能仅在此Conda环境中起作用。在此处输入图像描述

I'm facing an error while installing prophet on azure.
In fact i want to install prophet module to run it in my azure function however this module requires others to install such as pystan and cython, when i added them to my requirements and deployed the whole project i receive this following error.
This error is shown even while running it locally.
Is there any way we can install these packages without having any errors ?
Or can we use the local conda environment and use it in azure ?

PS : i create a conda environment locally using python 3.8.13 and installed all packages, the function only works in this conda environment.enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萌逼全场 2025-02-12 07:46:09

这可能会发生,因为在部署过程中,功能代码可能会被部署而不是软件包。

因此,您可以做的是容器化功能,然后部署它。

因此,使用所有模块构建功能,然后使用Docker将其容器化,并在Docker构建中包含所需的软件包,然后部署它们,从而将软件包在函数中存在。

请参阅此文档用于独立说明。

This might be happing because during deployment only function code maybe getting deployed and not the packages.

So, what you can do is containerize the function and then deploy it.

Thus build the function with all the modules then containerize it using docker and include the required packages in the docker build and then deploy them thus the packages will be present in the function.

Refer this documentation for Indepth explanation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文