0
0

Pythonを使用したAzure Functionsでサードパーティー製のライブラリ導入方法

Posted at

かけた時間の割にとてもシンプルだったので共有

まず、Pythonを使用したAzure Functionsの作成方法はMicrosoftのドキュメントを参照。

次に、生成されたファイルの 「requirements.txt」 の中に導入したいサードパーティー製のライブラリの名前を記載するだけ。

例:numpy と scikit-learn を追加

requirements.txt
# DO NOT include azure-functions-worker in this file
# The Python Worker is managed by Azure Functions platform
# Manually managing azure-functions-worker may cause unexpected issues

azure-functions
numpy
scikit-learn

Pythonコードを書く function_app.py のところに import すれば OK

例:numpy と OneClassSVM を import

function_app.py
import numpy as np
from sklearn.svm import OneClassSVM
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0