Set Up an Ubuntu PC for Azure Function Development Using Python and VS Code

This brief post provides a setup checklist for configuring an Ubuntu 20.04 PC for developing Azure Functions using Python and VS Code. It assumes that you have installed all the software needed for Hands-on Projects 1 and 2.

Prepare APT Repository to Install Azure Functions Core Tools

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-$(lsb_release -cs)-prod $(lsb_release -cs) main" > /etc/apt/sources.list.d/dotnetdev.list'

Install Azure Functions Core Tools

sudo apt update
sudo apt install azure-functions-core-tools-4

You can verify the install of Core Tools with the following:

func --version

This is also needed to allow VS Code to successfully create a virtual environment:

sudo apt install python3.8-venv

Required VS Code Extensions

Check whether the following VS Code extensions are installed, and install them if needed.

  1. Python
  2. Azure Account
  3. Azure Functions