Azure在Python运行时起作用。 H2O模块没有错误
我正在尝试创建使用H20模块的Azure Python函数。当我尝试在本地测试它时,即使我已经在sumplions.txt中指定了它,但它似乎没有可用的错误,并且它似乎已安装在虚拟env中,并且可以手动使用虚拟环境运行。
最小python代码:
import datetime
import logging
import h2o
import azure.functions as func
def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()
if mytimer.past_due:
logging.info('The timer is past due!')
logging.info('Python timer trigger function ran at %s', utc_timestamp)
要求.txt
h2o==3.32.0.2
Python版本3.9M Windows 10 OS。
I am trying to create an Azure python function which uses H20 module. When I tried to test it locally I am getting module not available error even though I have specified it in requirements.txt and it seem to be installed in the virtual env and I am able to run using virtual environment manually.
Minimal Python code:
import datetime
import logging
import h2o
import azure.functions as func
def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()
if mytimer.past_due:
logging.info('The timer is past due!')
logging.info('Python timer trigger function ran at %s', utc_timestamp)
requirement.txt
h2o==3.32.0.2
Python version 3.9m Windows 10 OS.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此处//i.sstatic.net/2m1gc.png“ alt =“在此处输入图像描述”>
带有版本
H2O == 3.32.0.2
,我在VS代码输出终端中也获得了相同的例外。因此,我尝试了以下版本并运行良好。
要求.txt文件:
结果:
>还可以使用版本
3.14.0.0.0.0.2
H2O模块。
With the version of
h2o==3.32.0.2
, I also got the same exceptions in VS Code output terminal.So, I have tried with the below versions and working well.
requirements.txt file:
Result:
It also working with the version
3.14.0.2
H2o module in Python.