Packages no loading from Requirements.txt

Johnson, Jeremy 0 Reputation points
2023-11-29T21:03:16.65+00:00

I have a simple Python app I am trying to deploy using a Function App. It was created using the "Develop in Portal" option, V1 programming model.

I uploaded the Requirements.txt file (since its not created when the function i created) and have the line with the package listed but I still get the following error:

Result: Failure Exception: ModuleNotFoundError: No module named 'requests'. Please check the requirements.txt file for the missing module

I've read all I could find and cant seem to get it to work. I don't use Python much, but we had this same app deployed a few years ago and it worked with no issues, I'm not sure what I'm missing. Any help would be greatly appreciated.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,620 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Konstantinos Passadis 17,456 Reputation points MVP
    2023-11-29T21:13:47.42+00:00

    Hello @Johnson, Jeremy

    Welcome to Microsoft QnA!

    I am confident that he code is not supported .The v1 means that your package shoul dupport python v3.6 which is not available anymore

    User's image

    Either in the TXT set the version of the package to an older one , or update the code to use newest Python Versions > 3.7 and on!


    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards


  2. Konstantinos Passadis 17,456 Reputation points MVP
    2023-11-29T21:46:23.9733333+00:00

    Hello @Johnson, Jeremy!

    Would you be able to send the Code ?

    If it is not a problem please post it here !

    Otherwise use v 3.7 and try with V1 again using a version on the package that is supported on 3.7


    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards


  3. Konstantinos Passadis 17,456 Reputation points MVP
    2023-11-29T23:10:26.2966667+00:00

    Hello @Johnson, Jeremy!

    Try requests==2.2.0

    The issue points to requests not being installed

    Maybe this specific setting will fix it

    Please try and let us know !


    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards