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.