devops artifact consumption by azure function

Yang Chowmun 411 Reputation points
2021-12-16T08:41:48.94+00:00

I have publish an artifact in DevOps and planning to consume by an function app.

I have tried this 2 methods but failed:

  1. In the requirement.txt, I have included the link available from the artifact such as
    --extra-index-url https://<user>:<password>@pkgs.dev.azure.com/_packaging/<artifact_name>/pypi/simple>
    is there anything else needed if I wanted to use this method?
  2. Following this link https://medium.com/@williamhaarder/python-packages-in-azure-devops-8a0bed4f8f97
    I have modified the pipeline to include the artifact in the pipeline. But when I run the pipeline, I am getting this error as

ERROR: Could not find a version that satisfies the requirement XXX (from versions: none)
ERROR: No matching distribution found for XXX

Any suggestions on how we should deal with this?
Thanks

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,679 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,796 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,456 Reputation points
    2021-12-17T13:22:36.06+00:00

    @Yang Chowmun ,

    Thanks for reaching out to Q&A.

    I am answering this from second method's perspective. It appears that the problem is with the python/packages version. Here are some common issues encountered by other developers, please check out these discussions to see if it helps.

    https://stackoverflow.com/questions/32302379/could-not-find-a-version-that-satisfies-the-requirement-package
    https://exerror.com/solved-could-not-find-a-version-that-satisfies-the-requirement/
    https://github.com/Azure/azure-cli/issues/1308

    Feel free to reach out to me if the above articles doesn't help.