Skip to content

Azure function with Timer Trigger throwing ModuleNotFound Error even when updated in requirements.txt #2625

@sashanknjs

Description

@sashanknjs

I am trying to use the Azure function with a Timer trigger. I have some text which I am converting to a pdf using PyPDF2 and reportlab. I added all my required modules and packages to requirements.txt. When I am trying to test my function locally using the Azure functions extension in VS Code, it is first installing the packages from requirements.txt

Requirement already satisfied: PyPDF2 in c:\abc\.venv\lib\site-packages (from -r requirements.txt (line 11)) (3.0.1)
Requirement already satisfied: reportlab in c:\abc\.venv\lib\site-packages (from -r requirements.txt (line 12)) (4.4.3)

But then when it executes Func Host Start, it throws a large error starting with

ERROR: Error: No module named 'PyPDF2', Cannot find module.

I am sure that I have used the correct virtual environment to install the requirements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions