I am trying to deploy my sample application to azure app service in linux. my application is a simple flask application that get's a key from the user and retrieves it's value from azure key vault.
from azure.keyvault.secrets import SecretClient
from azure.identity import DefaultAzureCredential
my requirements.txt is as follows:
azure-mgmt-resource
Flask==2.0.2
azure-identity==1.10.0
azure-keyvault-secrets==4.6.0
I have tried adding only azure but it throws me the following error and now I have no idea how to exit this loop:
│ exit code: 1
╰─> [25 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-x2lo6n9j/azure_e4ab6d93138d4411b0a31c7f2ffe6ad2/setup.py", line 60, in <module>
raise RuntimeError(message)
RuntimeError:
Starting with v5.0.0, the 'azure' meta-package is deprecated and cannot be installed anymore.
Please install the service specific packages prefixed by `azure` needed for your application.
The complete list of available packages can be found at:
https://aka.ms/azsdk/python/all
Here's a non-exhaustive list of common packages:
- azure-mgmt-compute (https://pypi.python.org/pypi/azure-mgmt-compute) : Management of Virtual Machines, etc.
- azure-mgmt-storage (https://pypi.python.org/pypi/azure-mgmt-storage) : Management of storage accounts.
- azure-mgmt-resource (https://pypi.python.org/pypi/azure-mgmt-resource) : Generic package about Azure Resource Management (ARM)
- azure-keyvault-secrets (https://pypi.python.org/pypi/azure-keyvault-secrets) : Access to secrets in Key Vault
- azure-storage-blob (https://pypi.python.org/pypi/azure-storage-blob) : Access to blobs in storage accounts
A more comprehensive discussion of the rationale for this decision can be found in the following issue:
https://github.com/Azure/azure-sdk-for-python/issues/10646
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
##[error]Bash exited with code '1'.
The pip install code I use in my azure pipeline is as follows:
- script: |
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
displayName: 'Install dependencies'