Skip to main content
Portrait Of Illuminated Laptop

How to: Installing modules in a Python Azure function

April 1st, 2021
HOW-TO

During an internship at Arinti, this guide was developed while combining Python with Azure to build a specialised application that converts sketches and electrical schema drawings into digital formats. This contribution comes from Cédric at Erasmushogeschool Brussel.

Setting up your environment

Initial setup requires installing Python and Visual Studio Code. Within VS Code, download the Azure Functions and Azure Account extensions from the marketplace. Create or sign into an Azure account through the Azure Functions interface, then generate a new function by selecting Python and your preferred environment.

Local installation and deployment caveat

Once the project initialises, open the terminal and install your dependencies (e.g. pip install opencv-python numpy). This lets you use the Azure Function locally. However, there's a critical limitation: deployment to Azure may generate errors because packages install only locally, not on the Azure platform itself. Additional configuration is required for cloud deployment success.

Portrait Of Illuminated Laptop
Working with Azure Functions?

LET'S TALK

How to Install Modules in Python Azure Functions | Arinti