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.
pip install requests
pip install tabulate
pip install future
pip install -f http://h2o-release.s3.amazonaws.com/h2o/latest_stable_Py.html 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:
azure-functions
h2o==3.36.1.2
Result:
It also working with the version 3.14.0.2
H2o module in Python.